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.

13 lines • 720 B
import { YearRangeContext } from "./rangeHooks.js"; /** * The range of a wrapped formatter (D25, D27). * * @param context the wrapper's state * @param a the start in epoch milliseconds * @param b the end in epoch milliseconds * @param before whether the start and the end precede 1873-01-01 * @returns the text, `""` when a joiner is unavailable, or `null` when a year run cannot be repaired * * @example yearRangeText(context, Date.UTC(1872, 11, 30), Date.UTC(1872, 11, 31), [true, true]) // "Dec 30 – 31, 1872 AD" for `en-u-ca-japanese` with `dateStyle: "medium"` */ export declare function yearRangeText(context: YearRangeContext, a: number, b: number, before: readonly [boolean, boolean]): string | null;