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.

44 lines • 3.16 kB
import { DefectId, ProbeRepro } from "./probeRepros.js"; /** * Zoned defects worked around in `internal/zonedWallClock*`: the range-limit defects (upstream * issue drafts A, B and D in the CORE-6 polyfill research) and zoned.E, the transition search * floored at 1847-01-01 (js-temporal/temporal-polyfill#372). Canary-only: no capability probe * gates them, because those fallbacks already run only when the polyfill throws, returns an * unchecked UTC value, or (zoned.E) is asked about an instant before 1847, where GMT computes the * spec's answer from offsets. */ export type ZonedDefectId = "zoned.A" | "zoned.B" | "zoned.D" | "zoned.E"; /** * Canary-only groups no capability probe gates. D9 (`largeMonthSpan.ts`): a probe large enough to * show the cost would be the abort itself, and timing is not deterministic; the workaround runs * only for amounts of at least `LARGE_MONTH_SPAN` months and computes the spec's answer. D21 * (`clock.ts`): the guard compares each `Temporal.Now` reading with `Date.now()` and never fires * on a fixed runtime. Neither changes any output when the polyfill is fixed. */ export type BoundedWorkDefectId = "D9" | "D21"; /** * Engine and CLDR defects the canary reads without a probe in `probeRepros.ts` (CORE-112). D23: * V8 without commit 0426b0d1045d aborts the process in `formatToParts` and `formatRangeToParts` on * a pattern with the week-of-year year field (nodejs/node#67076). D24: CLDR 48 patterns print that * week-year where the calendar year is meant. The guard in `weekYearGuard.ts` covers both and * changes no output once the engine and the data are right. D25 to D32 (`yearPrinting.ts`): the * japanese calendar prints Japanese eras before 1873-01-01 (ICU-23341, ICU-23619), an islamic calendar prints * a negative year before the Hijra (ICU-23327), `ja` japanese leaves a `2-digit` era year unpadded * (ICU-23620), and chinese and dangi pad the related year under `2-digit` (ICU-23621). D29 * (`rangeFields.ts`): a range drops, repeats or garbles a field of one date. D30 * (`formatterCache.ts`): `islamic` and `islamic-rgsa` resolve as Intl era/monthCode says. D31 * (`copticEra.ts`): the coptic calendar prints `1 - year` and no era before AM 1 (ICU-23277). D32 * (`islamicEpochEra.ts`): JavaScriptCore changes the Islamic era in the middle of the first day of year 1 * (WebKit 331724). D34 (`copticEra.ts`): JavaScriptCore changes the Coptic era in the middle of 1 Tout AM 1 * (WebKit 331724). D33 * (`lunisolarRefusal.ts`): hosts print different Chinese and Dangi dates, and the dependency reads * them from the host. */ export type CanaryDefectId = "D23" | "D24" | "D25" | "D26" | "D27" | "D28" | "D29" | "D30" | "D31" | "D32" | "D33" | "D34"; export interface Repro extends Omit<ProbeRepro, "defect"> { defect: DefectId | ZonedDefectId | BoundedWorkDefectId | CanaryDefectId; } export declare const repros: readonly Repro[]; /** The repro with this defect, calendar and name, if any. */ export declare function findRepro(defect: DefectId | ZonedDefectId | BoundedWorkDefectId | CanaryDefectId, calendar: string, name: string): Repro | undefined; export type { DefectId };