mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 12:03:45 +08:00
DEV: make prettier 💅 happy
This commit is contained in:
parent
5377d1672f
commit
84e5d58a0d
|
@ -203,11 +203,7 @@
|
|||
function _createDateTimeRange(dateTime, timezone) {
|
||||
const dt = moment(dateTime).tz(timezone);
|
||||
|
||||
return [
|
||||
dt.format("LLL"),
|
||||
"→",
|
||||
dt.add(24, "hours").format("LLL"),
|
||||
].join(" ");
|
||||
return [dt.format("LLL"), "→", dt.add(24, "hours").format("LLL")].join(" ");
|
||||
}
|
||||
|
||||
function _generatePreviews(dateTime, displayedTimezone, options) {
|
||||
|
@ -221,7 +217,9 @@
|
|||
timezone: watchingUserTimezone,
|
||||
current: true,
|
||||
dateTime: options.time
|
||||
? moment(dateTime).tz(watchingUserTimezone).format("LLL")
|
||||
? moment(dateTime)
|
||||
.tz(watchingUserTimezone)
|
||||
.format("LLL")
|
||||
: _createDateTimeRange(dateTime, watchingUserTimezone)
|
||||
});
|
||||
|
||||
|
@ -248,7 +246,9 @@
|
|||
previewedTimezones.push({
|
||||
timezone,
|
||||
dateTime: options.time
|
||||
? moment(dateTime).tz(timezone).format("LLL")
|
||||
? moment(dateTime)
|
||||
.tz(timezone)
|
||||
.format("LLL")
|
||||
: _createDateTimeRange(dateTime, timezone)
|
||||
});
|
||||
});
|
||||
|
@ -257,7 +257,9 @@
|
|||
previewedTimezones.push({
|
||||
timezone: "Etc/UTC",
|
||||
dateTime: options.time
|
||||
? moment(dateTime).tz("Etc/UTC").format("LLL")
|
||||
? moment(dateTime)
|
||||
.tz("Etc/UTC")
|
||||
.format("LLL")
|
||||
: _createDateTimeRange(dateTime, "Etc/UTC")
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user