import { Locale, PolyDateFormatter } from "./locale.js"; import { DateTime } from "../datetime.js"; import { Duration } from "../duration.js"; import { ZoneOffsetFormat } from "../types/zone.js"; import { Interval } from "../interval.js"; export interface FormatToken { literal: boolean; val: string; } export interface FormatterOptions extends Intl.DateTimeFormatOptions { allowZ?: boolean; floor?: boolean; forceSimple?: boolean; format?: ZoneOffsetFormat; padTo?: number; signMode?: Intl.NumberFormatOptions["signDisplay"] | "negativeLargestOnly" | "all"; } /** * @private */ export declare class Formatter { private readonly _loc; private readonly _opts; private _systemLoc?; constructor(locale: Locale, formatOptions: FormatterOptions); static create(locale: Locale, options?: FormatterOptions): Formatter; static macroTokenToFormatOpts(token: string): Intl.DateTimeFormatOptions; static parseFormat(fmt: string): { literal: boolean; val: string; }[]; dtFormatter(dt: DateTime, opts?: Intl.DateTimeFormatOptions): PolyDateFormatter; formatDateTime(dt: DateTime, opts?: Intl.DateTimeFormatOptions): string; formatDateTimeFromString(dt: DateTime, fmt: string): string; formatDateTimeParts(dt: DateTime, opts?: Intl.DateTimeFormatOptions): Intl.DateTimeFormatPart[]; formatDurationFromString(dur: Duration, format: string): string; formatInterval(interval: Interval, opts?: FormatterOptions): string; formatWithSystemDefault(dt: DateTime, opts: Intl.DateTimeFormatOptions): string; num(n: number, p?: number, signDisplay?: Intl.NumberFormatOptions["signDisplay"]): string; resolvedOptions(dt: DateTime, opts?: Intl.DateTimeFormatOptions): Intl.ResolvedDateTimeFormatOptions; }