Repository navigation
fix(core): right years and complete ranges in formatted dates; add the Pulse page (CORE-112, DOX-G9) - #523
Conversation
…G9, #522) Closes #522 - `upstream-filings.json`: add the fix PRs fullcalendar/temporal-polyfill#131 (Persian, fixing fullcalendar/temporal-polyfill#127) and fullcalendar/temporal-polyfill#132 (Chinese and Dangi, fixing fullcalendar/temporal-polyfill#128). Each keeps its issue's `gmtNote`, since GMT runs on `@js-temporal/polyfill`. - `context/dox/tracker.md`: add the DOX-G9 row.
baldurpan
left a comment
There was a problem hiding this comment.
I found nothing that needs changing.
What I checked
- Both new rows match the live pull requests. fullcalendar/temporal-polyfill#131 and #132 are open, not drafts, opened 13 Nov, and close #127 and #128. Their titles and URLs match.
- At this head,
node scripts/upstream.mjs checkpasses with 25 filings and 3 listings OK, andnode scripts/deps.mjs checkpasses with 59 domination, 26 dox and 5 canary rows OK. - The note on #131 is right.
@js-temporal/polyfill0.5.1 departs from the plain 33-year rule in exactly 78 years, 1502 to 2987 AP, and moves the leap day to the following year each time. That is the correction #127 asks for, so the fullcalendar fix can't change anything for GMT. - The note on #132 is right today. On 0.5.1, a Chinese or Dangi date under ICU 78 throws
Unexpected leap month suffix: Mo12. - The tracker count adds up. The table has 26 rows on 26 issues (#475 goes with #477 and has no row of its own), and sub-stories go from 34 to 35 with the DOX-G9 row.
Two small things, no threads, take or leave them
context/dox/tracker.mdline 6 is 105 characters. Every other line in the file wraps at 100. oxfmt skips.md, so nothing will catch it.- js-temporal/temporal-polyfill#360 closed on 21 Sep, and its fix (#361) is merged but not released yet. 0.5.1, from March 2025, is still the latest. When 0.5.2 ships, "throws on Chinese and Dangi dates under ICU 78" will be out of date for both this row and #128's, which has carried the same note since #469. That fix belongs to whichever pull request takes the polyfill bump, not this one.
CI is still running: Tests on Node 22, 24 and 26, and the Dox browser tests (Chromium, WebKit). The rest has passed, including the GMT TZ Tests matrix, Dox tables fit, Story consistency and No machine trailers. Release pack dry run is skipped.
baldurpan
left a comment
There was a problem hiding this comment.
Approving at e7e1054. I opened no threads, and nothing in the diff is unread. The two points in my review are optional.
CI is still running: Tests on Node 22, 24 and 26, and the Dox browser tests (Chromium, WebKit). 46 checks have passed, including all 30 GMT TZ Tests jobs, Dox tables fit, Story consistency and No machine trailers. Release pack dry run is skipped.
…7 problem 1 (DOX-G9, #522) - Bugs doc and swap research: list fullcalendar/temporal-polyfill#127, #128, #131 and #132, the status as of 13 November, and the eleven posts corrected that day. nodejs/node#67457 gets its own section (AD). - /upstream: add nodejs/node#67457 under Native engines. Why this polyfill now lists the Persian and Chinese/Dangi bugs in temporal-polyfill 1.0.8 with our reports and fixes, and links every fullcalendar number. - upstream-filings.json: synced from GitHub. The fullcalendar/temporal-polyfill#131 summary had the misread day the wrong way round, and the tc39/proposal-temporal#3335 summary now says the fake-timer case is js-temporal's. The ICU 78 note on #128 and #132 names 0.5.1, so it stays true after the next release. - D6: two cachedDay probes (hebrew, islamic-civil) catch tc39/proposal-temporal#3327 problem 1, which js-temporal `main` has since 853fc8b. 0.5.1 passes them, so no result changes. The trigger, README and compat snapshot say so (13 probes, 11 failing). Patch changeset. - The D11 trigger and nudge-window comments name 17e12be0af42, the proposal-temporal commit on `main`. Native-suite tags for nodejs/node#67457. - Bundle budgets for chargeableDays, operatingTimeBetween and dutyViolations rise by 100 bytes for the probe rows. - context/dox/tracker.md: wrap the issue list at 100 characters.
…tted dates (CORE-112, #524) - D23: GMT never calls formatToParts or formatRangeToParts on a pattern with `Y`, which aborts V8 without commit 0426b0d1045d (nodejs/node#67076). - D24: where a CLDR pattern prints the week-of-year year, single dates and ranges print the calendar year, as ECMA-402 gives it. - D25: japanese dates before 1873 print the Gregorian era. - D26: islamic dates before the Hijra give the empty value where the engine prints a negative year. - D27: ja japanese `year: 2-digit` pads the era year; 元年 stays. - D28: chinese and dangi print the related year at full width. Each repair is dormant behind its own engine probe and retires through the compat check. Records tc39/ecma402#1116 and ICU-23619, ICU-23620 and ICU-23621 on the upstream page and in the bug doc.
…ery raw option (CORE-112, #524) The verdict cache keyed on every option value, so values Intl ignores, such as `calendar: always`, each built a UTC twin and ran the week-year check, and thrashed the 256-entry cache. The key is now the resolved locale, calendar, numbering system and hour cycle plus the options that choose the pattern. The optionsObject formatYearMonth test drops from 6.8 s to 1.4 s on Node 22 and 26; it timed out at 30 s on the Node 22 TZ jobs.
## What `apps/dox` pins `astro` 7.4.2. `pnpm audit` reports two advisories for it, which fail CI's `No known vulnerabilities in dependencies` step on every branch: - GHSA-r3h5-4585-7x3w, moderate, fixed in 7.4.7 - GHSA-mh32-jxcr-mh9f, low, fixed in 7.4.5 This moves `astro` to 7.4.11, the newest release old enough for our pnpm minimum release age. 7.4.12 would need an exclusion, and we add none. ## Changes - `apps/dox/package.json`: `astro` 7.4.2 to 7.4.11 - `pnpm-lock.yaml`: regenerated ## Validation - `pnpm audit`: no known vulnerabilities - `node scripts/deps.mjs check`: OK. `pnpm peers check`: same as main - `dox:check`: 0 errors. `dox:lint`: clean. `dox:build`: 1,304 pages - `dox:test`: 20,303 passed, 1 failed. The failure is not from this change: the test finds fullcalendar/temporal-polyfill#131 on GitHub, which main's filings file does not list yet. #521 and #523 both add it.
…k-polyfill-fix-prs
D23 names only V8, so the native-suite check reports it out of scope on WebKit. The fake-browser test still expected one out-of-scope group; it now expects two and checks D23's state like D17's.
Main added its own rows for fullcalendar/temporal-polyfill#131 and #132. Keep one row each, with main's fuller #132 summary and the #132 note that names 0.5.1.
…#522; CORE-112, #524) Date ranges (CORE-112, D29): - `formatDateRange`, `formatDateTimeRange` and `formatZonedRange` check the range against the single dates field by field, as ECMA-402 Table 6 compares field values, and fall back to the two single dates only for a pattern class the engine prints wrong. - The gate covers 18 cases: a dropped, repeated or misplaced field, a missing era, the `ja` hour 12 under `hourCycle: h12` and the long day period printed short. - Islamic dates before the Hijra print an empty string; `ja` keeps 元年 and pads the rest. - A new weekly CLDR sweep runs the week-year and range-field detectors over every locale and calendar on Node 22, 24 and 26, and lists the locales that newly break or are fixed. - Upstream: CLDR-19912 (comment), CLDR-19913, ICU-23622, ICU-23623, ICU-23624 and ICU-23625. - Root bundle budget raised to 647000, and the four entry budgets that carry range formatting raised to match. Pulse (DOX-G9): - New `/pulse/` page in Start here: every scheduled check, what it watches, when it runs, its recent runs and the condition that retires it. The run history is read from GitHub at build only, best effort. - Badges, plates and cards across the site get bevelled corners, and the /upstream rows are reworked. Also refresh the compat snapshot (33 groups), the stats and the upstream filings, and add `postcss` as a Dox dev dependency for the bevel border test.
Brings in CORE-113 (#528). `plainOptionEntries` now lives in its own module on this branch, so CORE-113's option type gate (`isIntlOptionValue`, a wrong type throws `TypeError`) moves there, and the week-year guard's comment says so. Bundle budgets: `operatingTimeBetween` and `dutyViolations` carry both branches' growth; `root` stays at 647000.
…last test pass Close-out: - Fold the CORE-112 spec into `issues/CORE-112.md` (scope of the fix and Decisions) and the DOX-G9 spec into `context/dox/built.md`; rewrite inbound references and delete both spec folders. Both trackers move to Done. - Source comments cite CORE-112 instead of its slices. Fixes: - `/pulse/`: the workaround list on each card never opened, because nothing wired its disclosure. `mountPulse` now wires every disclosure at once, before gmt loads. - Canada and Moroccan clock-change pages: the Accepted formats disclosure never opened either. `wireStoredTimes` now wires it. - `/pulse/` and `/upstream`: the built site never read the optional live files. Vite rewrites `import.meta.glob` calls but leaves `typeof import.meta.glob` in the built code, where it is false, so every deploy showed no run history and the committed filings alone. Both modules now test `import.meta.env`, which Vite replaces at build, and a new guard test bans the old check across `src/`.
…re path Adds the eleven reports filed today to the upstream page: tc39 #3337, #3338, #3339, our comment on #3301, the Chromium 553245554 comment, WebKit 331724, 331725 and 331726, ICU-23626 and ICU-23627, and nodejs/node#67484. Each row names the workaround it retires (D15, D18, D19) or says GMT is not affected. The native-suite tags for records S and T now point at WebKit 331725 and 331726, so they go stale when WebKit ships the fix. The bug list, the temporalCompat README, CORE-82 and the range-edge audit no longer say those records are unfiled.
…k-polyfill-fix-prs # Conflicts: # .github/workflows/us-clock-watch.yml
baldurpan
left a comment
There was a problem hiding this comment.
I re-read the PR from e7e1054 to def5402. This time I went line by line through the range and week-year repair files, the probes and the canary scripts. The library tests (10,859) and the Dox tests pass. node scripts/upstream.mjs check and the Pulse check are clean, and every new upstream link resolves.
I left four comments: one should-fix on cache growth in weekYearRange.ts, a D15 row that still says it isn't filed, and two small wording fixes in the docs.
…D15 is filed - weekYearRange: the month-day, era, reference-year and year-shift maps were keyed by the caller's moments and never emptied. Each now starts again at 1,024 entries, like the other caches in the repair files. A test shows a forgotten range is repaired the same. - D15 is filed as tc39/proposal-temporal#3337: the temporalCompat README, zonedWallClock.ts, workarounds.mjs (and the compat snapshot) and CORE-83 no longer say it is unfiled. - CORE-112: the source rule names every file `weekYearSource.test.ts` allows. - Range-edge audit: B, C and D were filed on 2026-09-18, A on 2026-09-19.
…he stats The cache test repaired 2,000 ranges and took 7.9 s on CI, past the 5 s limit. It now repairs `MAX_MOMENTS / 2` ranges a week apart, each adding two new moments, which is the fewest that empties a map (0.5 s locally), with a 15 s limit for slow runners. It still fails with the limit removed. gmt-stats.json counts the new test.
…cache limit The `MAX_MOMENTS` limit in `weekYearRange.ts` adds 37 bytes to the root entry (647,037 minified against 647,000). Every other entry is within its budget.
baldurpan
left a comment
There was a problem hiding this comment.
I read the rest of the PR at d53df53: the scripts/upstream.mjs changes and the twelve new test files. upstream.mjs check rejected each broken fixture I tried, and the tests pass under other time zones and locales. One comment, inline.
The rule matched only dots and slashes before the module name, so an import of `../internal/weekYearGuard` from a namespace folder passed it. It now matches any path that ends in the module, in a static `from` or a dynamic `import(`. A stray import of each kind from `src/plain/` fails the test.
Closes #522
Closes #524
Relates to #460, which waits on fullcalendar/temporal-polyfill#131 and fullcalendar/temporal-polyfill#132 before moving GMT to
temporal-polyfill.What
Two stories in one pull request.
CORE-112 (#524). Some languages' date patterns crash Node, print the wrong year, or print a range that loses part of one date. GMT no longer makes the
formatToPartsorformatRangeToPartscall that aborts V8 on a CLDR pattern withY. Where the engine's text differs from what the specifications give, GMT prints the specifications' text. Every repair is dormant behind its own engine probe and retires through the compat check.formatToPartson a pattern withYaborts Node (exit 133)Dùbh 2025for 2024-12-30Dùbh 2024Dec 31, 5 MeijiDec 31, 1872 AD-22 AHjaJapaneseyear: "2-digit":令和6年令和06年(元年 stays)year: "2-digit":05(yi-chou)5(yi-chou)10 – 12 Jun 202410 Mei 2024 - 12 Jun 2024en-u-ca-islamicprints the astronomical date:Muh. 5, 1446 AHislamic-tbladate:Muh. 4, 1446 AHD29 follows ECMA-402: a range is checked against the two single dates field by field, as Table 6 compares field values. Only for a pattern the engine prints wrong does GMT print the two single dates in full, joined by the language's own range separator. The probe covers 18 cases, from a dropped, repeated or misplaced field to a missing era, the
jahour 12 underhourCycle: "h12"(午前0時~3時is now午前12時~午前3時) and a long day period printed short.tc39/ecma402#1116 asks ECMA-402 to limit its rule for years before 1 to calendars with an era of their own for those years.
DOX-G9 (#522). A new page, Pulse, under Start here: the ten scheduled checks GMT runs against the engines, the polyfill, the world's clocks and this site. Each shows what it watches, when it runs, its recent runs and the condition that retires it. The run history is read from GitHub at build time only, best effort.
/upstreammoves from Migrate to Start here beside it.It also brings every record of our upstream filings up to date: the two fix pull requests on
fullcalendar/temporal-polyfill, the Node report nodejs/node#67457, the eleven posts we corrected on 13 November, and the CLDR, ICU and Chromium reports for D29 and D30. Two probes keep GMT's own month count if a later@js-temporal/polyfillrelease carries tc39/proposal-temporal#3327 problem 1.It also adds the eleven reports filed on 15 November: tc39/proposal-temporal#3337, #3338 and #3339, a comment on tc39/proposal-temporal#3301, a comment on Chromium 553245554, WebKit 331724, 331725 and 331726, ICU-23626 and ICU-23627, and nodejs/node#67484. Each row names the GMT workaround that the fix retires, or says that GMT is not affected.
IntlChanges
CORE-112
packages/gmt/src/internal/weekYearGuard.ts,weekYearRange.ts,weekYearSynth.ts,weekYearText.ts,repairRangeText.ts: the D23 guard, through theformatterCache.tsconstruct hook, and the D24 single-date and range repairs.packages/gmt/src/internal/yearPrinting.ts,yearPrintingRange.ts,japaneseNumerals.ts: D25 to D28, for single dates and ranges.formatterCache.tsexportsguardedDateTimeFormat, the D23 and D24 guard without these repairs, whichtemporalCompat/islamicEra.tsuses.packages/gmt/src/internal/rangeDetector.ts,rangeFields.ts,rangeFieldValues.ts,rangeFallback.ts,rangeRepairs.ts,rangeHooks.ts,patternKey.ts: D29.formatDateRange,formatDateTimeRangeandformatZonedRangeuse them.formatterCache.ts: D30,islamicbuilt asislamic-tblaandislamic-rgsaas the language's default calendar.temporalCompat/capabilities.ts,repros.tsandrangeFieldRepros.ts: one probe and one repro group per defect. README rows, triggers and removal steps D23 to D30.scripts/lib/workarounds.mjs: the same eight entries.scripts/canary/weekYear.mjsandscripts/canary/rangeFields.mjs: the sweeps over every CLDR locale and calendar..github/workflows/cldr-sweep-weekly.ymlruns both once a week on Node 22, 24 and 26 and lists the locales that newly break or are fixed.apps/dox/src/data/temporal-compat.tsand the snapshot: what breaks, D23 to D30 (33 groups, 29 still needed).scripts/bundle-size.budgets.json:rootto 647,000,formatDateto 175,800,chargeableDaysto 216,500,operatingTimeBetweento 224,600 anddutyViolationsto 249,300, for the repairs above.context/domination/js-temporal-polyfill-bugs.md§ AF and § AG, andissues/CORE-112.md, which holds the scope of the fix and the decisions. The spec folder is folded in and deleted.DOX-G9
apps/dox/src/content/docs/pulse.mdx,src/components/pulse/,src/widgets/families/pulse/,src/lib/pulse-view.ts,pulse-mount.ts,src/data/pulse.ts: the page.scripts/lib/pulse.mjslists the checks;apps/dox/scripts/build-pulse.mjsreads each workflow's schedule and jobs from its YAML and the run history from GitHub, and--checkkeeps the list and the workflows in step.src/lib/section-order.ts:upstreamandpulsejoin Start here.bevel-border-widths.test.tsguards that, withpostcss8.5.31 as a Dox dev dependency, the version stylelint already uses.apps/dox/src/data/upstream-filings.json: every filing synced from GitHub and Jira, the twofixrows each closing its issue, and the new CLDR, ICU and Chromium reports.scripts/lib/upstream-trackers.mjsreads the Jira, Chromium and Bugzilla trackers.src/data/pulse.tsandsrc/data/upstream-filings.tstestimport.meta.envbefore reading their optional live files. The old test,typeof import.meta.glob, stays in the built code and is false there, so the built site never read either file.import-meta-glob-guard.test.tsbans it acrosssrc/.clock-change-stored.ts: the Accepted formats disclosure on the Canada and Moroccan clock-change pages now opens. Nothing wired it before.context/dox/built.mdholds the page's lasting rules; the spec folder is folded in and deleted./upstream: Temporal on v26.x: until() and round() add one smallestUnit to a whole number of years, months or weeks (temporal_rs 0.2.3) nodejs/node#67457 under Native engines. "Why this polyfill" lists the Persian and Chinese/Dangi bugs intemporal-polyfill1.0.8 with our reports and fixes.context/domination/js-temporal-polyfill-bugs.md: the new filings in the Filed table, a Corrected posts table, § AD for Temporal on v26.x: until() and round() add one smallestUnit to a whole number of years, months or weeks (temporal_rs 0.2.3) nodejs/node#67457.cachedDayprobes (hebrew, islamic-civil) for Polyfill: non-ISO until() by months gives wrong results since #3245, and throws near the range limits tc39/proposal-temporal#3327 problem 1, which js-temporalmainhas since853fc8b. 0.5.1 passes both, so no result changes.context/dox/tracker.md: DOX-G9, and the issue list wraps at 100 characters.scripts/lib/native-suite-tags.mjs: the native-suite rows for records S and T link WebKit 331725 and 331726, so each one goes stale when WebKit ships its fix. The temporalCompat README (D18, D19),issues/CORE-82.mdand the range-edge audit no longer call those reports unfiled.Validation
At
f5209157, after merging CORE-113 (#528):node scripts/affected.mjs run: all 24 checks passed, among them format, deps, test markers, licences, docs check, bundle size, the gmt, gmt-oxlint and Dox builds, stats, compat snapshot, upstream, Pulse, API surface, lint and typecheckpackages/gmtVitest: 1,026 files and 76,989 tests passed/pulse/and/upstream/passed the Dox gates in Chromium and WebKit, dark and light: frame check, axe, tab walk, media and table fitAt
59e2466f:/pulse/with its run history: 20 passed, 3 failed and 22 with no runAt
def5402c:node scripts/upstream.mjs check: 53 filings and 3 listings OK