/** * Date and locale primitives shared by every date-bearing component. * * Calendar and DateField each grew their own copies of these; they are pure, * framework-agnostic and identical in behaviour, so they live here instead of * drifting apart. Component-specific calendar maths stays in the component. */ /** * Calendar-day sort key — `YYYYMMDD` as a number * (`year * 10000 + month * 100 + day`), month 1-based. Lets two dates be * compared or ordered by calendar day, ignoring time and timezone. */ export declare const toDayKey: (year: number, month: number, day: number) => number; /** `toDayKey` for a `Date`, using its local calendar day. */ export declare const dateToDayKey: (date: Date) => number; /** True for a `Date` instance that isn't `Invalid Date`. */ export declare const isValidDate: (value: unknown) => value is Date; /** ECMAScript's own baseline, used when a locale is omitted or unresolvable. */ export declare const DEFAULT_LOCALE = "en-US"; /** * Canonical BCP-47 cache key, so `en-US` and `en-us` share one entry. A * malformed tag can't be canonicalized, so it's lower-cased — still * case-insensitive, and it can't collide with a canonical key, which is never * all-lowercase for a region subtag. * * Memoized on the raw tag because callers use it as the key for their own * caches, so it runs on every lookup rather than every miss. Constructing an * `Intl.Locale` and stringifying it measures around 2.6 µs — an order of * magnitude more than the `format` calls it guards. Keying on the raw tag does * mean `en-US` and `en-us` take a slot each; that's the price of not paying the * 2.6 µs to find out they're the same, and the memo's ceiling bounds it. */ export declare const canonicalLocaleKey: import('./memo').BoundedMemo<[locale: string], string>; /** * Whether the runtime actually supports the tag. `supportedLocalesOf` is the * gatekeeper: a structurally-valid but unknown tag (`xy-ZZ`) resolves to the * runtime default rather than throwing, so callers must check this to force * their own fallback. Throws on a malformed tag, which counts as unsupported. */ export declare const isLocaleSupported: (locale: string) => boolean; /** * The locale to actually format with — the tag itself when the runtime knows * it, {@link DEFAULT_LOCALE} otherwise. Formatting an unsupported tag directly * would silently use the *runtime's* default locale, which differs between a * server and a browser, so callers resolve through this instead. */ export declare const resolveLocale: (locale: string) => string; /** @internal — test-only. Clears the canonical-key cache for Intl isolation. */ export declare const __clearLocaleKeyCache: () => void;