UNPKG

@formatjs/intl-datetimeformat

Version:
15 lines (14 loc) 879 B
import { type DateTimeFormat, type DateTimeFormatLocaleInternalData, type IntlDateTimeFormatInternal, type IntlDateTimeFormatPart } from "@formatjs/ecma402-abstract"; import Decimal from "decimal.js"; import { type ToLocalTimeImplDetails } from "./ToLocalTime.js"; export interface FormatDateTimePatternImplDetails { getInternalSlots(dtf: Intl.DateTimeFormat | DateTimeFormat): IntlDateTimeFormatInternal; localeData: Record<string, DateTimeFormatLocaleInternalData>; getDefaultTimeZone(): string; } /** * https://tc39.es/ecma402/#sec-partitiondatetimepattern * @param dtf * @param x */ export declare function FormatDateTimePattern(dtf: Intl.DateTimeFormat | DateTimeFormat, patternParts: IntlDateTimeFormatPart[], x: Decimal, { getInternalSlots, localeData, getDefaultTimeZone, tzData }: FormatDateTimePatternImplDetails & ToLocalTimeImplDetails): IntlDateTimeFormatPart[];