UNPKG

@burglekitt/gmt

Version:

Temporal-based date and time utilities with timezone support and polyfill integration

23 lines (22 loc) 693 B
interface LocaleWeekInfo { firstDay: number; weekend: number[]; minimalDays: number; } declare global { namespace Intl { interface Locale { readonly weekInfo: LocaleWeekInfo; } } } /** * Resolve the set of ISO day-of-week numbers (1 = Monday .. 7 = Sunday) * that count as "weekend" for a locale, via `Intl.Locale.prototype.weekInfo`. * * - Returns `null` if `locale` is not a valid BCP 47 tag. * - Falls back to Saturday/Sunday (`[6, 7]`) if `weekInfo` is unavailable * on the runtime (older engines) or unresolvable for the given locale. */ export declare function getLocaleWeekendDays(locale: string): Set<number> | null; export {};