/** * The date STYLE — orthogonal to time (pass `time: true` to prepend a 24h time to any of these). * `date` reassembles dd/MM with a stable "/"; the readable styles use word months in locale order. * NOT for a component's own internal chrome — a calendar's header / weekday / a11y labels, a gantt * axis — which render their own internally-consistent label set with `Intl` directly. */ export type DateFormatStyle = "date" | "medium" | "long" | "dayMonth" | "monthYear" | "quarterYear"; export interface FormatDateOptions { /** The date style. Default "date". */ format?: DateFormatStyle; /** Prepend the 24h time — "14:30 ". Composes with ANY `format`. Default false. */ time?: boolean; /** BCP-47 locale. Defaults to the product's home market, "vi-VN". */ locale?: string; /** Drop the year ("22/05") on the numeric `date` style. */ compact?: boolean; /** Rendered for null / empty / unparseable input. Default "". */ emptyLabel?: string; } /** * A Date or ISO value → a local wall-clock `Date` (period start for a reduced-precision value). * "" / null / unparseable → `null`. Use {@link formatDate} for display; this is for callers that * need the `Date` itself (a picker anchor, an axis position). */ export declare function parseDate(value: Date | string | null | undefined): Date | null; /** * A Date or ISO value → the `DatePicker` / workflow date value. "" when empty. * * **Reduced precision is PRESERVED, not expanded.** A `date` field may carry "YYYY-MM" or "YYYY"; * those are returned verbatim so a round-trip through a form never fabricates a day (writing back * "2026-05-01" for a value the user entered as "2026-05" would corrupt it). A full value (Date, * `yyyy-MM-dd`, or a datetime) reassembles as "yyyy-MM-dd". */ export declare function toISODate(value: Date | string | null | undefined): string; /** * THE date-value formatter — the date sibling of `formatMoney`. Accepts a `Date` OR an ISO string * and returns a localized display string; defaults to the home market. `format` picks the date * style: `date` → `22/05/2026`; `medium` → `22 thg 5, 2026`; `long` → `22 tháng 5, 2026`; * `dayMonth` → `22 thg 5`, `monthYear` → `Tháng 5 năm 2026`, `quarterYear` → `Quý 2 năm 2026` * (`Q2 2026` outside Vietnamese). **`time: true` prepends the 24h time to * ANY style** — `14:30 22/05/2026`, `14:30 22 tháng 5, 2026` (time-first). `compact` drops the * year on the numeric `date` style. Never hand-roll a date with `padStart` / `getMonth` / a raw * `Intl.DateTimeFormat` for VALUE display — call this. (Component-internal chrome is exempt — see * {@link DateFormatStyle}.) * * **Reduced-precision values render only the parts they carry** — a month-year value shows * `05/2026` (numeric) / `thg 5, 2026` (readable), a bare year shows `2026`; no day is fabricated * and `time` is ignored (a calendar period has no clock). */ export declare function formatDate(value: Date | string | null | undefined, options?: FormatDateOptions): string;