UNPKG

@formatjs/intl-datetimeformat

Version:
15 lines (14 loc) 865 B
import { DateTimeFormat, DateTimeFormatLocaleInternalData, IntlDateTimeFormatInternal, IntlDateTimeFormatPart } from '@formatjs/ecma402-abstract'; import Decimal from 'decimal.js'; import { ToLocalTimeImplDetails } from './ToLocalTime'; 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[];