()
| 6 | * available. |
| 7 | */ |
| 8 | export function localeFirstDay(): number { |
| 9 | try { |
| 10 | const loc = new Intl.Locale(navigator.language) as unknown as { |
| 11 | weekInfo?: { firstDay?: number } |
| 12 | getWeekInfo?: () => { firstDay?: number } |
| 13 | } |
| 14 | const info = loc.weekInfo ?? loc.getWeekInfo?.() |
| 15 | if (info && typeof info.firstDay === 'number') return info.firstDay % 7 // 7(Sun)->0 |
| 16 | } catch { |
| 17 | /* ignore */ |
| 18 | } |
| 19 | return 1 |
| 20 | } |
| 21 | |
| 22 | /** |
| 23 | * Resolve the `calendarWeekStart` preference to a 0 (Sunday) .. 6 index for |
no outgoing calls
no test coverage detected