UNPKG

@northguild/gmt

Version:

Date and time library for JavaScript and TypeScript, built on TC39 Temporal: time zones, DST, business days, ISO 8601 strings in and out. Never throws.

22 lines • 1.31 kB
import { RepairedText, WeekYearAnalysis } from "./weekYearText.js"; type Part = Intl.DateTimeFormatPart; /** * A formatter's text at a time value with the digits of each name in `varyingNames` hidden, the * length kept: its digit runs are then the same on every date, which `analyse` and `repairText` * need. A name is found where no digit touches it (ksb narrow weekday `3` beside a day `13`). * * @param options the options the formatter was built with * @param resolved its resolved options */ export declare function createNameMask(options: Intl.DateTimeFormatOptions, resolved: Intl.ResolvedDateTimeFormatOptions): (text: string, ms: number) => string; /** * Parts of one flagged formatter, from its repaired `format` text and its twins. * * @param options the options the formatter was built with * @param resolved its resolved options * @param analysis what was read from its text * @param repair the formatter's repaired text at a time value, or `null` * @returns a function from a time value to its parts, or `null` where no answer is known */ export declare function createPartsSynth(options: Intl.DateTimeFormatOptions, resolved: Intl.ResolvedDateTimeFormatOptions, analysis: WeekYearAnalysis, repair: (ms: number) => RepairedText | null): (ms: number) => Part[] | null; export {};