/** Date-only display preset — sent as `x-date-format` to backend. */ import { type AppTimeFormat } from "./time-formats.js"; export type AppDateFormat = "iso" | "ymd" | "dmy" | "mdy"; /** * `ymd` (`yyyy/MM/dd`) IS THE JAPANESE BUSINESS FORM, AND ITS ABSENCE WAS A HOLE WITH NO WAY OUT. * * The axis shipped three values and none of them said `2026/05/01`: `iso` writes hyphens, and the * two slash forms put the day or the month first. A Japanese-first consumer (gino-cloud) therefore * wrote its own formatter and marked it an explicit stopgap — the tell that a named axis was * missing a value rather than the consumer wanting something exotic, since the only alternative * the package left was the thing docs/DATETIME.md rule 1 forbids ("never use date-fns/format, * toLocaleString, or raw ISO slices for UI"). * * It sits BEFORE the day/month-first pair because it is the other year-first form, next to `iso`. */ export declare const APP_DATE_FORMATS: readonly ["iso", "ymd", "dmy", "mdy"]; export declare const APP_REQUEST_HEADER_DATE_FORMAT: "x-date-format"; /** * A date-fns pattern equivalent to `Intl.DateTimeFormat(locale, options)` — Gregorian calendar, * Latin digits (what date-fns prints). `null` when the engine cannot format `locale`. */ export declare function intlDatePattern(locale: string, options: Intl.DateTimeFormatOptions): string | null; /** * The locale's own numeric date pattern, from `Intl` (v32, gh#1219): `de` → `dd.MM.yyyy`, `en-GB` * → `dd/MM/yyyy`, `ja` → `yyyy/MM/dd`, `vi` → `dd/MM/yyyy`, `en` → `MM/dd/yyyy`. */ export declare function getLocaleDatePattern(locale: string): string; /** The ORDER the locale writes a numeric date in, from `Intl` — `ymd`, `dmy` or `mdy`. */ export declare function getLocaleDateOrder(locale: string): Exclude; /** * date-fns pattern for date-only display IN A LOCALE (v32, gh#1219): the order the locale writes * natively is printed with the locale's own separators from `Intl` — `dmy` under `de` is * `dd.MM.yyyy`. Any other order prints the fixed {@link getDatePattern}. For `vi`, `en` and `ja` * the native pattern equals the fixed one, so they print exactly what they always did. */ export declare function getLocaleAwareDatePattern(dateFormat: AppDateFormat, locale: string): string; /** date-fns pattern for date-only display. */ export declare function getDatePattern(dateFormat: AppDateFormat): string; /** date-fns pattern for date + time (table cells); with a `locale`, its native separators. */ export declare function getDateTimePattern(timeFormat: AppTimeFormat, dateFormat: AppDateFormat, locale?: string): string; export declare function isAppDateFormat(value: string | null | undefined): value is AppDateFormat;