/** UK display fallback (date-fns tokens) — numeric `dd/MM/yyyy`. */ declare const ORG_DATE_FALLBACK_FORMAT = "dd/MM/yyyy"; /** UK time display fallback (date-fns tokens) — 24-hour `HH:mm`. */ declare const ORG_TIME_FALLBACK_FORMAT = "HH:mm"; /** The org's preferred date-fns date format, or null to fall back to the UK default. */ declare function getOrgDateFormat(): string | null; /** The org's preferred date-fns time format, or null to fall back to the UK default. */ declare function getOrgTimeFormat(): string | null; /** * Stamps the module-level date/time format refs. Called by the surface sync hook * each time organisation settings resolve. Pass `null` for either argument to * clear that format and fall back to the deterministic UK default. */ declare function setOrgFormats(dateFormat: string | null, timeFormat: string | null): void; /** The org's effective date format: the configured override when grammar-valid, else the UK `dd/MM/yyyy` fallback. */ declare function resolveOrgDateFormat(): string; /** The org's effective time format: the configured override when grammar-valid, else the UK `HH:mm` fallback. */ declare function resolveOrgTimeFormat(): string; /** * Formats a date/ISO string for display in the org's dateFormat (UK `dd/MM/yyyy` * fallback) — never the OS locale. Returns em-dash for falsy/invalid. */ declare function formatDate(dateStr?: string | null): string; /** * Formats a date/ISO string with time in the org's date+time formats (UK * `dd/MM/yyyy HH:mm` fallback). Returns em-dash for falsy/invalid. */ declare function formatDateTime(dateStr?: string | null): string; /** * Extracts the time portion from an ISO datetime string in the org's timeFormat * (UK `HH:mm` fallback). A bare `HH:mm`/`HH:mm:ss` value (no date component) is * anchored to a fixed date and rendered in the org's time format too — a 12-hour * org turns `14:30` into `2:30 PM`, it is NOT passed straight through. Returns * em-dash for falsy values, and the original string for anything that is neither * ISO nor a bare `HH:mm(:ss)`. */ declare function formatTime(timeStr?: string | null): string; /** * Formats a date/ISO string in the org's dateFormat (UK fallback), or returns * `"Present"` for falsy/invalid values. Use for open-ended ranges where a missing * end date means "still active" — distinct from {@link formatDate} which returns em-dash. */ declare function formatDateOrPresent(dateStr?: string | null): string; /** * Returns a short relative-time phrase — "Just now", "5m ago", "3h ago", "2d ago" — * or the absolute org-formatted datetime for anything older than a week. Returns * em-dash for falsy/unparseable values. `now` is injectable for tests. * * The org-aware sibling of core-utils `formatTimeAgo`, which shares the tier ladder * but falls back to the ISO date (not the org format) and returns "" for empty. */ declare function formatRelativeTime(dateStr?: string | null, now?: Date): string; /** * Converts a date-fns format string to the equivalent dayjs tokens. Only four token * families differ — year (`y`->`Y`), day-of-month (`d`->`D`), weekday (`E`->`d…`) * and meridiem (`a`->`A`); month, hour, minute and second are identical. * * Quoted literals are handled properly rather than blindly regex-replaced: date-fns * escapes literal text with single quotes (`dd 'day' MMM` renders a literal "day"), * which must NOT have its letters rewritten and must become a dayjs bracket literal * (`[day]`); `''` is a literal apostrophe. */ declare function dateFnsToDayjsFormat(fmt: string): string; /** * The org's date mask as dayjs tokens for a MUI X date picker — the effective * date format converted to dayjs tokens, so the UK fallback yields `DD/MM/YYYY`. * Mirrors {@link formatDate} so an editable input shows the read-only format. */ declare function getOrgDateInputFormat(): string; /** * The org's date+time mask as dayjs tokens for a datetime picker, combining * {@link getOrgDateInputFormat} with the effective time format (UK fallback yields `HH:mm`). */ declare function getOrgDateTimeInputFormat(): string; export { ORG_DATE_FALLBACK_FORMAT, ORG_TIME_FALLBACK_FORMAT, dateFnsToDayjsFormat, formatDate, formatDateOrPresent, formatDateTime, formatRelativeTime, formatTime, getOrgDateFormat, getOrgDateInputFormat, getOrgDateTimeInputFormat, getOrgTimeFormat, resolveOrgDateFormat, resolveOrgTimeFormat, setOrgFormats };