Plan UI: Fix inaccurate day formatting for negative TZs (#28433)

Co-authored-by: Michael Geers <michael@geers.tv>
This commit is contained in:
Bryce Lampe 2026-03-21 07:35:40 -07:00 • committed by GitHub
parent d96b045117
commit 1f9845b72a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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"]