import { Temporal } from '@js-temporal/polyfill-patched'; import { NepaliPlainDate } from '../custom-calendars/nepaliCalendar'; import { SupportedCalendar } from '../types'; /** * A date value that is either a real Temporal.PlainDate (any CLDR calendar) * or a hand-rolled implementation for a calendar Temporal doesn't support * natively (currently just NepaliPlainDate). Lives here rather than under * custom-calendars/ since it's a general date-representation concern used * throughout hooks and period-calculation, not something specific to the * Nepali calendar - a future second custom calendar would extend this union * and register itself in customPlainDateImplementations below, not change * anything Nepali-specific. */ export type AnyPlainDate = Temporal.PlainDate | NepaliPlainDate; export declare const isNepaliPlainDate: (date: AnyPlainDate) => date is NepaliPlainDate; /** * Converts to a genuine ISO 8601 Temporal.PlainDate - for comparisons/arithmetic * that must be calendar-agnostic, and for re-deriving a date's ISO position * before reinterpreting it in a different calendar. A real (non-Nepali) * Temporal.PlainDate still carries its own calendar tag and must be * re-tagged via withCalendar - it is NOT already ISO just because it isn't * Nepali. */ export declare const toIsoPlainDate: (date: AnyPlainDate) => Temporal.PlainDate; /** Same day AND same calendar - mirrors Temporal.PlainDate.prototype.equals' calendar-sensitivity. */ export declare const isSameDate: (a: AnyPlainDate, b: AnyPlainDate) => boolean; type CustomPlainDateImplementation = { from: (fields: { year: number; month: number; day: number; }, options?: Temporal.AssignmentOptions) => AnyPlainDate; fromIso: (isoDate: Temporal.PlainDate) => AnyPlainDate; }; export declare const getCustomPlainDateImplementation: (calendar: SupportedCalendar) => CustomPlainDateImplementation | undefined; export {};