Major new version #2

Merged
LeoVasanko merged 86 commits from vol002 into main 2025-08-26 05:58:24 +01:00
Showing only changes of commit 898ec2df00 - Show all commits

View File

@ -234,13 +234,13 @@ function getLocalizedWeekdayNames(timeZone = DEFAULT_TZ) {
}
function getLocaleFirstDay() {
return new Intl.Locale(navigator.language).weekInfo.firstDay % 7
const day = new Intl.Locale(navigator.language).weekInfo?.firstDay ?? 1
return day % 7
}
function getLocaleWeekendDays() {
const wk = new Intl.Locale(navigator.language).weekInfo.weekend || [6, 7]
const set = new Set(wk.map((d) => d % 7))
return Array.from({ length: 7 }, (_, i) => set.has(i))
const wk = new Set(new Intl.Locale(navigator.language).weekInfo?.weekend ?? [6, 7])
return Array.from({ length: 7 }, (_, i) => wk.has(1 + ((i + 6) % 7)))
}
function reorderByFirstDay(days, firstDay) {