export type DatePickerFormat = "date" | "datetime" | "date_range" | "datetime_range"; export interface DateParts { y: number; mo: number; d: number; h: number; mi: number; } export declare function isRangeFormat(format: DatePickerFormat): boolean; export declare function hasTimeFormat(format: DatePickerFormat): boolean; export declare const pad: (n: number) => string; export declare function parsePart(input: string): DateParts | null; export declare function partsToIso(p: DateParts, hasTime: boolean): string; export declare function isoToDate(iso: string): Date | null; export declare function dateToParts(d: Date): DateParts; /** "" when blank, null when unparseable. */ export declare function parseText(text: string, hasTime: boolean): string | null; export declare function timeText(iso: string): string; export declare function splitTime(time: string): { h: number; mi: number; }; export declare function withCalendarDate(date: Date, prevIso: string, hasTime: boolean): string; /** Today if none. */ export declare function withTimeOfDay(prevIso: string, time: string): string; export declare function nowIso(hasTime: boolean): string; export declare function isoHasTime(iso: string | null | undefined): boolean; /** Empty when unparseable. */ export declare function dropTime(iso: string): string; export type DateCommit = { kind: "save"; value: string; } | { kind: "clear"; } | { kind: "none"; } | { kind: "invalid"; }; /** * `draft` is the last complete value ("" when emptied); `incomplete` flags a partial entry, which * never commits or wipes the stored value. An emptied draft clears only when `clearable`, else * reverts. */ export declare function resolveDateCommit(opts: { draft: string; value: string | null; incomplete: boolean; clearable: boolean; }): DateCommit; /** Null when not a valid time. */ export declare function parseTimeString(input: string): string | null;