We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
weekInfo
1 parent 779b057 commit 7ae07d2Copy full SHA for 7ae07d2
packages/svelte-ux/src/lib/utils/dateInternal.ts
@@ -5,7 +5,8 @@ export function getWeekStartsOnFromIntl(locales?: string): DayOfWeek {
5
return DayOfWeek.Sunday;
6
}
7
8
- const info = new Intl.Locale(locales);
+ const locale = new Intl.Locale(locales);
9
// @ts-ignore
10
- return (info.weekInfo.firstDay ?? 0) % 7; // (in Intl, sunday is 7 not 0, so we need to mod 7)
+ const weekInfo = locale.weekInfo ?? locale.getWeekInfo?.();
11
+ return (weekInfo?.firstDay ?? 0) % 7; // (in Intl, sunday is 7 not 0, so we need to mod 7)
12
0 commit comments