/** * Locale-aware month and weekday name tables, backed by `Intl.DateTimeFormat` * and memoized per locale. * * Building an `Intl.DateTimeFormat` is comparatively expensive, so each locale's * long/short name arrays are computed once and cached. Detectors call * {@link getMonthNames} / {@link getWeekdayNames} freely without per-cell cost. * * @packageDocumentation */ /** Number of months in the Gregorian calendar. */ export declare const MONTHS_IN_YEAR = 12; /** Number of days in a week. */ export declare const DAYS_IN_WEEK = 7; /** A locale's long and short name variants for a cyclic name set. */ export interface NameTable { /** Full names in canonical (locale-default) casing, index-aligned. */ readonly long: readonly string[]; /** Abbreviated names in canonical casing, index-aligned. */ readonly short: readonly string[]; /** Case-insensitive lookup: normalized name → index (covers long + short). */ readonly index: ReadonlyMap; } /** * Returns the memoized month name table for a locale. * * @param locale - BCP-47 locale tag. * @returns The locale's month {@link NameTable} (indices `0`–`11`). */ export declare function getMonthNames(locale: string): NameTable; /** * Returns the memoized weekday name table for a locale, indexed `0` = Sunday … * `6` = Saturday (matching `Date.prototype.getDay`). * * @param locale - BCP-47 locale tag. * @returns The locale's weekday {@link NameTable}. */ export declare function getWeekdayNames(locale: string): NameTable; /** Clears the locale name caches. Exposed for tests and hot config reloads. */ export declare function clearNameCaches(): void; //# sourceMappingURL=locale-names.d.ts.map