import { type TemporalLike } from './tokens.js'; import { type Piece } from './tokenize.js'; import { type NumberingFormatOptions } from './numbering.js'; /** * Format a Temporal.PlainDate, PlainTime, PlainDateTime, or ZonedDateTime * using a date-fns-style token string. * * @example * format(Temporal.Now.plainDateISO(), 'yyyy-MM-dd') // "2026-08-04" * format(zdt, "MMM d, yyyy 'at' h:mm a") // "Aug 4, 2026 at 3:45 PM" * format(zdt, 'MMMM d, yyyy', { locale: 'fr-FR' }) // "août 4, 2026" * * Throws on a token the input type doesn't support (e.g. 'HH' on a PlainDate). */ export declare function format(temporal: TemporalLike, formatStr: string, options?: NumberingFormatOptions): string; export interface FormattedPart { type: 'literal' | 'token'; value: string; token?: string; } export declare function formatToParts(temporal: TemporalLike, formatStr: string, options?: NumberingFormatOptions): FormattedPart[]; export interface CompiledFormat { format(temporal: TemporalLike, options?: NumberingFormatOptions): string; formatToParts(temporal: TemporalLike, options?: NumberingFormatOptions): FormattedPart[]; readonly pieces: ReadonlyArray; readonly formatStr: string; } export declare function compileFormat(formatStr: string): CompiledFormat; export declare function _getPieces(formatStr: string): Piece[]; export declare function _handlerFor(token: string): { fn: (t: TemporalLike, locale: string) => string; field: keyof TemporalLike; } | undefined;