import { type Locale } from "date-fns"; import type { DatePickerBaseProp, PickerDateFormatProp } from "../../props/components/data-entry.prop.js"; /** The granularity axis a picker selects at — `DatePickerProp["picker"]`, resolved. */ export type DatePickerPicker = NonNullable; /** Display is independent from the canonical value submitted by the field. */ export declare function formatPickerDate(date: Date | undefined, format: PickerDateFormatProp | undefined, locale: string, withTime?: boolean): string; export declare function parsePickerDate(text: string, format: PickerDateFormatProp | undefined, parser?: (text: string) => Date | undefined, withTime?: boolean): Date | undefined; export declare function pickerDateAllowed(date: Date, min: Date | undefined, max: Date | undefined, disabled?: (date: Date) => boolean): boolean; /** Normalize a reporting period with the active calendar's week convention. */ export declare function pickerPeriodStart(date: Date, picker: DatePickerBaseProp["picker"], locale: Pick): Date; /** * ISO-8601 at the precision the picker actually selects. * * The standard defines reduced forms, and a month picker that submits `2026/03` is simply using * none of them: `/` is not an ISO separator and a server parsing an ISO date will reject it. Each * granularity gets the shortest ISO form that loses nothing: * year → `2026` · month → `2026-03` · quarter → `2026-01` (the quarter's first month, which is * what the value IS) · week → `2026-W07` (ISO week-numbering year + week) · date → `2026-03-01`. */ export declare function toIsoPeriod(date: Date | undefined, picker: DatePickerPicker): string; /** * The inverse of `toIsoPeriod`: read back the reduced ISO form the field displays for this * granularity. `date` is left to `parsePickerDate`, which already owns the full `yyyy-MM-dd` path * (custom parser, `format` pattern, era display). */ export declare function parseIsoPeriod(raw: string, picker: DatePickerPicker): Date | undefined;