@mitcsutt/kiln-forms
Version:
Kiln forms: typed React forms on TanStack Form, in component or JSON schema mode, rendered through kiln-ui
13 lines (12 loc) • 969 B
TypeScript
/** `2026-10-03` → "3 Oct 2026" (locale order), read as a calendar date (no time-zone drift). */
export declare function formatDate(value: string | null | undefined, locale?: string): string;
/** `14:30` → "14:30" / "2:30 PM" per locale, or on `hourCycle`'s clock when it's set. */
export declare function formatTime(value: string | null | undefined, locale?: string, hourCycle?: 12 | 24): string;
/** `2026-10-03T14:30` → date + time per locale (wall-clock, no time-zone conversion). */
export declare function formatDateTime(value: string | null | undefined, locale?: string, hourCycle?: 12 | 24): string;
/**
* A date-time that may be a UTC instant (`2026-10-03T04:30:00Z`), read on `timeZone`'s clock (the
* device's without one) and formatted like `formatDateTime`. A wall-clock value is formatted as
* it is.
*/
export declare function formatDateTimeIn(value: string | null | undefined, timeZone?: string, locale?: string, hourCycle?: 12 | 24): string;