//#region src/adapter/adapter.utils.d.ts /** * Shared `today()` helper for adapters whose date type is the native `Date`. * Returns midnight local time (year/month/day with no time component) so that * the returned reference is comparable with other adapters' midnight outputs. */ declare function nativeToday(): Date; declare function buildCalendarLocaleTag(locale: string, calendar: string): string; /** * Creates a single-slot per-adapter-instance cache for Gregorian-to-calendar * conversions, keyed by date ordinal. * * **Hit pattern (intentional):** the 3 sequential calls `getYear` / `getMonth` / * `getDate` on the same date hit the cache 2/3 times. Every cursor advance in * `buildCalendarMonth` invalidates the slot, so cross-cell sharing only happens * for repeated reads on the same cell. * * **Not** a multi-slot LRU. Two adapter instances on the same page get separate * slots (via the `WeakMap` keyed by instance), but a single adapter rendering * two months in the same React tree will thrash on every advance. If that * becomes a hot path, replace this with an ordinal-keyed LRU. */ declare function createConversionCache(convert: (date: Date) => T): { get(instance: object, date: Date): T; }; /** * Formats a date using Intl.DateTimeFormat with a specific calendar system. * Handles locale tag construction and formatter caching. * * @param numberingSystem - Optional Unicode numbering system (e.g. 'arabext' for Persian). * Appends `-nu-` to the locale tag if not already present. */ declare function formatWithCalendar(date: Date, options: Intl.DateTimeFormatOptions, baseLocale: string, calendar: string, locale?: string, numberingSystem?: string): string; //#endregion export { buildCalendarLocaleTag, createConversionCache, formatWithCalendar, nativeToday };