Plan UI: Fix inaccurate day formatting for negative TZs (#28433)
Co-authored-by: Michael Geers <michael@geers.tv>
This commit is contained in:
parent
d96b045117
commit
1f9845b72a
1 changed files with 2 additions and 2 deletions
|
|
@ -379,12 +379,12 @@ export default defineComponent({
|
|||
const day = index === 0 ? 6 : 6 + index;
|
||||
return new Intl.DateTimeFormat(this.$i18n?.locale, {
|
||||
weekday: format,
|
||||
}).format(new Date(Date.UTC(2021, 5, day)));
|
||||
}).format(new Date(2021, 5, day)); // local date avoids UTC timezone day shift
|
||||
},
|
||||
fmtMonthByIndex(index: number, format: Intl.DateTimeFormatOptions["month"]) {
|
||||
return new Intl.DateTimeFormat(this.$i18n?.locale, {
|
||||
month: format,
|
||||
}).format(new Date(Date.UTC(2021, index, 1)));
|
||||
}).format(new Date(2021, index, 1)); // local date avoids UTC timezone day shift
|
||||
},
|
||||
getWeekdaysList(
|
||||
format: Intl.DateTimeFormatOptions["weekday"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue