/** * Translates a Day.js format string to the equivalent temporal-fmt * token string. * * ```js * translateDayjsFormatString('YYYY-MM-DD HH:mm:ss'); // "yyyy-MM-dd HH:mm:ss" * translateDayjsFormatString('[Q]Q YYYY'); // "'Q'Q yyyy" (bracketed text stays literal) * ``` * * Throws if the format string uses a Day.js token with no temporal-fmt * equivalent (`Do`, `Mo`, `Qo`, `k`, `kk`, `X`, `x`, the localized * `L`-family tokens) — these need to be rewritten by hand, since * there's no single temporal-fmt token that means the same thing. * * Note: `Do`/`Mo`/`Qo`/`k`/`kk`/`X`/`x` only have meaning in Day.js * once the `AdvancedFormat` (and, for `X`/`x`, base) plugins are * loaded — without them Day.js silently glues the parts together or * passes the letters through unrendered instead of erroring. This * function assumes the plugin is loaded, since that's the common case * for anyone who put these tokens in a format string on purpose. */ export declare function translateDayjsFormatString(formatStr: string): string; /** * Translates a date-fns format string to the equivalent temporal-fmt * token string. date-fns already uses Unicode-style tokens close to * temporal-fmt's own, so most strings pass through with only a case * change on the weekday tokens; the notable divergences are date-fns's * `D`/`DD` (day-of-year, matches temporal-fmt already) versus its `d`/ * `dd` (day-of-month, also matches already) and the locale-dependent * `P`/`p` composite tokens, which have no single temporal-fmt token * and throw. */ export declare function translateDateFnsFormatString(formatStr: string): string;