/** * Resolves the full-date input/display format from an optional explicit override and the active locale. * * Resolution order: * 1. `override` (the `dateFormat` renderer string), if set; * 2. the locale's short-date format, derived via `Intl` (e.g. `de-CH` -> `DD.MM.YYYY`); * 3. `DD/MM/YYYY` as a final fallback (no locale, or an unusable locale format). */ export declare function resolveDateFormat(locale?: string, override?: string): string; /** * The full-date input/display format currently configured on the renderer, e.g. * `DD/MM/YYYY` (default) or `DD.MM.YYYY` (Switzerland). Reads from the renderer config store; * use {@link resolveDateFormat} directly in React components so they re-render on config changes. */ export declare function getDateFormat(): string; /** * Derives the single separator character from a date format string. * For example `DD.MM.YYYY` -> `.`, `DD/MM/YYYY` -> `/`. Falls back to `/`. */ export declare function getDateSeparator(dateFormat: string): string; /** * Derives the month-year format from a full-date format string, preserving the token order of * the full date. For example `DD.MM.YYYY` -> `MM.YYYY`, `MM/DD/YYYY` (US) -> `MM/YYYY` and * `YYYY/MM/DD` (year-first, e.g. `ja-JP`) -> `YYYY/MM`. */ export declare function getMonthYearFormat(dateFormat: string): string; /** * Derives the day/month/year token order of a date format. * For example `DD/MM/YYYY` -> `['D', 'M', 'Y']`, `MM/DD/YYYY` (US) -> `['M', 'D', 'Y']`. */ export declare function getDateTokenOrder(dateFormat: string): Array<'D' | 'M' | 'Y'>; /** * Maps positional date parts (in the order they appear in the input/format) to day/month/year * using the token order of `dateFormat`. For a US format `MM/DD/YYYY`, `['03', '15', '2024']` * maps to `{ month: '03', day: '15', year: '2024' }`. */ export declare function orderDateParts(parts: string[], dateFormat: string): { day: string; month: string; year: string; }; export declare function validateDateInput(input: string): boolean; /** * Validates the two positional parts of a month-year value (in the order they appear in the * input), mapping them to month/year according to the month-year format derived from `dateFormat`. * This makes validation work for month-first (`MM/YYYY`) and year-first (`YYYY/MM`) formats alike. */ export declare function validateTwoMatches(firstInput: string, secondInput: string, dateFormat: string): boolean; /** * Validates the three positional parts of a full date (in the order they appear in the input), * mapping them to day/month/year according to `dateFormat`. This makes validation work for * day-first (`DD/MM/YYYY`), month-first (`MM/DD/YYYY`, US) and year-first formats alike. */ export declare function validateThreeMatches(firstInput: string, secondInput: string, thirdInput: string, dateFormat: string): boolean; export declare function getNumOfSeparators(valueDate: string, seperator: string): number; /** * Parse a FHIR date string to a human-readable display format. * * @author Sean Fong */ export declare function parseFhirDateToDisplayDate(fhirDate: string): { displayDate: string; dateParseFail?: boolean; }; /** * Parse a FHIR dateTime string to a human-readable display format. * Supports full and partial FHIR dateTime values. * * @author Sean Fong */ export declare function parseFhirDateTimeToDisplayDateTime(fhirDateTime: string): { displayDateTime: string; dateParseFail?: boolean; }; export declare function parseInputDateToFhirDate(displayDate: string): string;