# Helping fix Temporal

Industry: Core

GMT is built on [Temporal](https://tc39.es/proposal-temporal/), the new JavaScript date and
time standard. Node and some browsers now have Temporal built in, but GMT runs on the community
[`temporal-polyfill`](https://github.com/fullcalendar/temporal-polyfill) 1.0.9
everywhere, so it gives the same answer on every runtime. Every week, GMT's whole test suite also runs on the built-in
engines.

**If you use GMT, there is nothing on this page for you to do.** The polyfill has a handful of bugs
in rare corners of the calendar. GMT spots each one and gives you the right answer anyway. The rest
of this page is the detail: which bugs, and what we have done to get them fixed for everyone.

We test GMT against the Temporal standard itself, never against the polyfill, so we can see when the
polyfill is wrong. When it is, we send the fix to the people who maintain the polyfill, and to the
Temporal standard's own reference code where the same bug lives there too.

## Which bugs GMT still works around

Each row is one bug in the polyfill, together with the code GMT runs instead so that you still get
the right answer.

The middle column says whether GMT still needs that code. GMT includes a small test for each bug and
runs it against the polyfill version it depends on; the numbers are what those tests returned when
this page was built. When the polyfill fixes a bug, the row changes on its own.

| What GMT works around | Still needed? | What we sent |
| --- | --- | --- |
| **D16** — Time ranges that name the time zone in a long or offset form, such as Eastern Standard Time or GMT-5, which Chrome, Node and Safari cut to a short name or drop | ✓ Yes — 4 of 6 checks fail | — |
| **D17** — Time ranges that show a flexible day period and a time zone, such as 10 in the morning GMT-5, which Firefox writes as 10 AM | ✓ Yes, on Firefox — 1 of 1 checks pass on Node, which does not show this defect | [Mozilla 2085525](https://bugzilla.mozilla.org/show_bug.cgi?id=2085525) |
| **D19** — Two names for one zone, such as UTC and Etc/UTC or Asia/Kolkata and Asia/Calcutta, which the polyfill treats as different zones in Safari and WebKit | ✓ Yes, on WebKit — 1 of 1 checks pass on Node, which does not show this defect | [tc39 #3301](https://github.com/tc39/proposal-temporal/issues/3301#issuecomment-6892556793) |
| **D22** — A length in days or larger measured from a repeated hour, which the polyfill can measure from the wrong pass or refuse, so it can be an hour too long or missing. Where the specification has no value, which also happens after a skipped hour, GMT returns its sentinel | ✓ Yes — 2 of 8 checks fail | [tc39 #3336](https://github.com/tc39/proposal-temporal/issues/3336) |
| **D23** — Some languages and calendars, among them Scottish Gaelic, Galician, Burmese and Telugu, whose date patterns use the week-of-year year: asking Node or Chrome for the parts of such a date, or of a range, stopped the process with no error to catch | ✓ Yes — 1 of 1 checks fail | [node #67076](https://github.com/nodejs/node/issues/67076) |
| **D24** — Dates in the same languages near the start or end of a year, which every browser prints with the year the week belongs to rather than the calendar year, and with some calendars, such as Buddhist in Telugu, on every day of the year | ✓ Yes — 7 of 7 checks fail | [CLDR-19873](https://unicode-org.atlassian.net/browse/CLDR-19873?focusedCommentId=213171) |
| **D25** — Japanese calendar dates before 1873, which every browser prints in a Japanese era such as Meiji 5 or Taika, where the calendar uses the Gregorian era until the end of 1872. A range across 1873 prints each date in its own era | ✓ Yes — 2 of 2 checks fail | [ICU-23619](https://unicode-org.atlassian.net/browse/ICU-23619) |
| **D26** — Islamic calendar dates before the Hijra (622 CE), which Node and Chrome print as a negative year. They have no name for the era before the Hijra, so GMT returns its empty value there | ✓ Yes — 1 of 1 checks fail | — |
| **D27** — Japanese calendar dates in Japanese with a two-digit year, which every browser prints as 令和6年 where 令和06年 is asked for, and with Arabic-Indic or other digits asked for, which Node, Chrome and Safari print in Latin digits. The first year of an era stays 元年 | ✓ Yes — 2 of 2 checks fail | [ICU-23620](https://unicode-org.atlassian.net/browse/ICU-23620) |
| **D28** — Chinese and Korean calendar dates with a two-digit year, where the Gregorian year shown beside the cycle year was padded, such as 05 for the year 5 | ✓ Yes — 1 of 1 checks fail | [ICU-23621](https://unicode-org.atlassian.net/browse/ICU-23621) |
| **D29** — Date ranges in some languages and calendars that leave out, repeat or mix up a part of one date, such as a Chinese calendar range a year apart without the Gregorian year, or a Yoruba range with the weekday twice. GMT prints both dates in full, joined the language's own way | ✓ Yes — 18 of 18 checks fail | [CLDR-19912](https://unicode-org.atlassian.net/browse/CLDR-19912), [CLDR-19913](https://unicode-org.atlassian.net/browse/CLDR-19913), [ICU-23622](https://unicode-org.atlassian.net/browse/ICU-23622), [ICU-23623](https://unicode-org.atlassian.net/browse/ICU-23623), [ICU-23624](https://unicode-org.atlassian.net/browse/ICU-23624), [ICU-23625](https://unicode-org.atlassian.net/browse/ICU-23625) |
| **D30** — Dates in the calendars named islamic and islamic-rgsa, which Node and Chrome print with an astronomical Islamic calendar the standard no longer offers. GMT uses islamic-tbla for islamic, and the language's default calendar for islamic-rgsa | ✓ Yes — 2 of 2 checks fail | [Chromium 585635918](https://issues.chromium.org/issues/585635918) |
| **D31** — Coptic calendar dates before the year 1 AM (ISO 284-08-29), which Node and Chrome print as a positive year counted backwards, such as 286 for the year -285, with no era. GMT prints the signed year and the era name | ✓ Yes — 1 of 1 checks fail | — |
| **D32** — Islamic calendar dates on the first day of the year 1 AH (ISO 0622-07-19, and 0622-07-18 for islamic-tbla), which Safari prints for its first hours as the year 0 Before Hijra, and, west of UTC, the last hours of the day before as AH. GMT prints year 1 AH for the whole day | ✓ Yes, on WebKit — 1 of 1 checks pass on Node, which does not show this defect | [WebKit 331724](https://bugs.webkit.org/show_bug.cgi?id=331724) |
| **D33** — Chinese and Korean (Dangi) calendar dates on a runtime that prints them differently from the Purple Mountain Observatory (Chinese) or KASI (Dangi) date, such as Node and Chrome, which put the Chinese New Year 2027 on 7 February where the observatory has 6 February. GMT has no calendar data of its own, so on such a runtime a Chinese or Dangi date format returns its empty value. A runtime that prints the observatory date keeps its own text | ✓ Yes — 5 of 6 checks fail | [fullcalendar #128](https://github.com/fullcalendar/temporal-polyfill/issues/128), [fullcalendar #132](https://github.com/fullcalendar/temporal-polyfill/pull/132) |
| **D34** — Coptic calendar dates on the first day of the year 1 AM (ISO 284-08-29), which Safari prints for its first hours with the long era name Anno Martyrum, and ranges across that day, which Safari prints with the era twice. GMT prints AM for the whole day | ✓ Yes, on WebKit — 1 of 1 checks pass on Node, which does not show this defect | — |
| **D9** — Adding a very large number of months in a non-ISO calendar, where the polyfill takes a long time to refuse an amount that is out of range | ✓ Yes — 1 of 1 checks fail | — |

**Still needed?** shows what GMT's own tests for that bug returned against the polyfill version it
depends on. A dash under **What we sent** means we had nothing to send to the polyfill: someone had
already fixed the bug, it cannot reach anyone using GMT, or the bug is in a browser's or Node's own
date formatting. Those reports are listed under [Native engines](#native-engines). **Kept on
purpose** means every check passes, but only because the polyfill version GMT depends on cannot show
that bug yet. GMT keeps its fix until someone has checked a newer release.

## How a fix reaches you

`temporal-polyfill` publishes fixes in its regular patch releases. Every week, GMT's upgrade check
(the polyfill-swap leg of the [weekly runs](https://github.com/northguild/gmt/actions/workflows/temporal-oracle.yml))
runs the test for every bug in the table above, and GMT's whole test suite, against each new
release. When every test for a bug passes, GMT marks that workaround as removable and takes it out in
a GMT release. Until then, GMT's own code covers the bug.

The maintainers of `@js-temporal/polyfill`, which GMT ran on before, asked us to send fixes to the
Temporal standard first, because they were bringing that polyfill back in line with the standard one
change at a time. That is why several of the pull requests below were closed with thanks instead of
merged. None was turned down; each was sent where it would do more good.

## Why this polyfill

From 1.24.0, GMT runs on [`temporal-polyfill`](https://github.com/fullcalendar/temporal-polyfill) 1.0.9 from FullCalendar, imported from `temporal-polyfill/full/implementation`. GMT releases up to 1.23.1 ran on [`@js-temporal/polyfill`](https://github.com/js-temporal/temporal-polyfill) 0.5.1. There are three reasons. Month arithmetic takes bounded time on `temporal-polyfill` for any amount inside Temporal's range, where `@js-temporal/polyfill` steps through months in a loop that can run for a long time on a very large amount. `temporal-polyfill` has a maintained release line: it fixed every bug we reported to it, each in its next release. And it is smaller, 23.3 kB gzipped against 44.2 kB, which is 20.9 kB less on every import. The [bundle size](/gmt/bundle-size/#why-gmt-uses-temporal-polyfill) page has the figures for each function.

On Node, GMT's whole test suite passes on `temporal-polyfill` with no test failing that passes on `@js-temporal/polyfill`, and its UTC offsets match `Intl.DateTimeFormat` in every time zone, on every day from 1970 to ten years ahead. Three limits remain, and GMT works around each one. An amount of months outside Temporal's range still makes the polyfill do work that grows with the amount before it throws, so GMT refuses those amounts first. A length measured from a time in an hour that happens twice gets an answer in two cases where the standard has none, so GMT returns its empty value there. The third, which its maintainers closed as a known limitation (FullCalendar #118, not our report), is that it can treat a link name such as `Asia/Calcutta` as a different zone from `Asia/Kolkata`. GMT's own probe sees it in WebKit, as `Etc/UTC` not equal to `UTC`, and GMT corrects that comparison there.

Comparing every calendar's years with Node's built-in Temporal found two more differences in `temporal-polyfill`, and we sent a fix for each. From 1502 AP (2123), 78 Persian years are leap years where the built-in Temporal makes the next year the leap year, so each next year starts a day late. We reported it as [#127](https://github.com/fullcalendar/temporal-polyfill/issues/127), and our fix, [#131](https://github.com/fullcalendar/temporal-polyfill/pull/131), was released on 29 November 2026. Chinese and Dangi dates are read from `Intl.DateTimeFormat`, which disagrees with the built-in Temporal in some years: it puts Chinese New Year 2027 on 7 February, not 6 February. We reported it as [#128](https://github.com/fullcalendar/temporal-polyfill/issues/128) and sent a fix as [#132](https://github.com/fullcalendar/temporal-polyfill/pull/132). The maintainer keeps these two calendars on `Intl.DateTimeFormat` on purpose, so that a date's fields always match how the same runtime formats it, and closed #128 as working as intended. On a runtime whose Chinese or Dangi dates differ, GMT's formatters return their empty value for such a date instead of a date that depends on the runtime. The full comparison is in GMT's repository:
[`temporal-polyfill-swap.md`](https://github.com/northguild/gmt/blob/main/context/domination/research/temporal-polyfill-swap.md).

## What we sent, and what happened to it

Sometimes a fix is already written and waiting, and another pull request would only add noise. What
helps then is evidence: a way to reproduce the bug, and measurements of what the pending fix
changes. Those are listed here too, marked as someone else's work.

**So far we have sent 52 reports and fixes to Temporal and the projects it builds on, 9 of them as ready-to-merge code changes, and added the evidence to 8 more the maintainers had already written. GMT already gives you the correct answer for 58 of them: 18 through its own built-in fix, and 40 because the bug is in code GMT doesn't use. For 2 more, GMT has no workaround.**

## Beyond Temporal

GMT also asks other projects to list it when a list or comparison should include it: by a pull request, or by an issue where only collaborators may open one.

| Submission | What it asks | Status | Replies | Last activity |
| --- | --- | --- | --- | --- |
| [sindresorhus/awesome-nodejs#1402](https://github.com/sindresorhus/awesome-nodejs/issues/1402) Add GMT to Date | Suggests @northguild/gmt for the Date section, as an issue because pull requests there are limited to collaborators. | Open | 0 | 2026-11-27 |
| [sorrycc/awesome-javascript#1209](https://github.com/sorrycc/awesome-javascript/pull/1209) Add GMT to Date | Adds @northguild/gmt to the Date section. | Closed without merging | 0 | 2026-12-03 |
| [you-dont-need/You-Dont-Need-Momentjs#159](https://github.com/you-dont-need/You-Dont-Need-Momentjs/pull/159) Add a Built on column and @northguild/gmt to the comparison | Adds a "Built on" column and an @northguild/gmt row to the Brief Comparison table, an @northguild/gmt column to Feature Parity, and an @northguild/gmt example to each how-to section. | Open, awaiting review | 0 | 2026-11-03 |

## What this means for you

**You don't need to do anything.** Where the polyfill has one of these bugs, GMT uses its own
correct code instead. The first time it needs a fix, it checks whether the installed polyfill still has that
bug; where the bug is gone, GMT uses the polyfill directly. You get the same correct answer either
way.

So when a polyfill release carries these fixes, GMT's extra code simply stops being used. Your
results don't change, which is the point: there is nothing here for you to keep track of.

These checks run on their own, so nobody has to remember them. Every bug on this page has a test
that runs against the installed polyfill, and GMT's answers are compared with the Temporal built
into Chrome — date by date, across every calendar GMT supports. For GMT 1.24.0 that comparison
found no differences.

## Native engines

Every week, GMT runs its whole test suite on the Temporal built into Node 26, Chromium,
Firefox, WebKit on Linux and WebKit on macOS, and expects the same answers it gets on the polyfill. A failure that no known bug
explains opens an issue in GMT's repository. Each run lists the exact engine versions it used:
see the [weekly runs](https://github.com/northguild/gmt/actions/workflows/temporal-oracle.yml),
and [Pulse](/gmt/pulse/) for what each check watches and when it retires.

The built-in engines have a few bugs of their own. We report each one we find. The list so far:

- [`unicode-org/icu4x#8620`](https://github.com/unicode-org/icu4x/issues/8620): Node and Chromium
  reject a one-letter annotation key, such as `[a=bc]`, which the standard allows.
- [`boa-dev/temporal#529`](https://github.com/boa-dev/temporal/issues/529): Node and Chromium
  accept the calendar `islamic`, which the standard says to reject.
- Node 26 throws when it rounds to the day on a date that starts twice, such as 6 November 2010
  in `America/Goose_Bay`. Chromium 153 already has the fix, so a later Node will have it too.
- [`nodejs/node#67457`](https://github.com/nodejs/node/issues/67457): Node 26 adds an extra month
  or week when it rounds up a length that is a whole number of years, months or weeks. From
  1 January 2000 to 1 January 2001, rounded up to months, it gives one year and one month. The fix
  is already in `temporal_rs`, the Temporal code that Node and Chromium share, and Chromium 153
  has it. The report asks Node 26 to take it.
- [`nodejs/node#67076`](https://github.com/nodejs/node/issues/67076): Node 22, 24 and 26 stop with
  a crash when they split a date into parts in a few languages, such as Burmese with the Buddhist
  calendar, or Galician with the Hebrew calendar and a full date. These languages' date patterns
  print the year a week belongs to (see the next item). V8, the JavaScript engine in Node and
  Chromium, has the fix, and Chromium 158 has it. The report asks Node to take it.
- In CLDR, the data every engine formats dates with, some languages' date patterns print the year
  a week belongs to instead of the calendar year. Scottish Gaelic, for example, prints December
  2025 for 30 December 2024, and Telugu with the Buddhist calendar prints 2026 all year instead of
  2569. Node, Chromium and Safari all print it. Someone else reported two of these languages as
  [CLDR-19873](https://unicode-org.atlassian.net/browse/CLDR-19873), and
  [our comment there](https://unicode-org.atlassian.net/browse/CLDR-19873?focusedCommentId=213171)
  adds the rest.
- Node, Chromium and Safari print a few other years wrong. Japanese calendar dates before 1873
  come out in a Japanese era such as Meiji 5, where the standard gives the Gregorian era;
  [`ICU-23341`](https://unicode-org.atlassian.net/browse/ICU-23341) fixes the years before Meiji
  in ICU 79.1. Node and Chromium print Islamic dates before the Hijra as a negative year
  ([`ICU-23327`](https://unicode-org.atlassian.net/browse/ICU-23327)). In Japanese, a two-digit
  year in the Japanese calendar prints as 令和6年 instead of 令和06年, and the Chinese and Korean
  calendars pad the Gregorian year shown beside the cycle year, such as 05 for the year 5. We
  reported these two as [`ICU-23620`](https://unicode-org.atlassian.net/browse/ICU-23620) and
  [`ICU-23621`](https://unicode-org.atlassian.net/browse/ICU-23621), and Meiji 1 to 5 as
  [`ICU-23619`](https://unicode-org.atlassian.net/browse/ICU-23619).
- [`tc39/ecma402#1116`](https://github.com/tc39/ecma402/issues/1116): the standard's rule for
  years before 1 fits only calendars that count those years backwards in an era of their own, such
  as BC. It asks to limit the rule to those calendars.
- [`ICU-20548`](https://unicode-org.atlassian.net/browse/ICU-20548): Node, Chromium and Safari
  shorten a long zone name in a time range, and drop an offset name such as `GMT-5`.
- [Bugzilla 1998020](https://bugzilla.mozilla.org/show_bug.cgi?id=1998020): Firefox accepts a
  zoned date on 19 April −271821, just outside the range the standard allows.
- [Bugzilla 2085525](https://bugzilla.mozilla.org/show_bug.cgi?id=2085525): Firefox prints AM and
  PM in a time range that asks for a day period such as "in the morning", when a zone name is shown.
- WebKit, on Linux and on macOS, adds a year to the 30th of Dhu al-Hijjah in an Islamic year
  before the Hijra as 13 months, so the result lands a month late. The report to WebKit is pending.
- WebKit, on Linux and on macOS, throws when it adds a year to the last day of Chaitra in a year
  before about 4800 BCE. The report to WebKit is pending.
- [WebKit bug 330688](https://bugs.webkit.org/show_bug.cgi?id=330688): WebKit on Linux, and
  Safari on macOS 27, reject the time zone ids `CST6CDT`, `EST5EDT`, `MST7MDT` and `PST8PDT`,
  which the time zone database still defines.
- [`ICU-23609`](https://unicode-org.atlassian.net/browse/ICU-23609): ICU 75 and later, which WebKit on macOS uses for calendar arithmetic, counts
  every Persian year before year 0 (621 CE) as a leap year. Adding a month to the 30th of Bahman,
  the 11th month, in such a year then throws instead of giving the 29th of Esfand. We also
  reported it on [ICU's support list](https://groups.google.com/a/unicode.org/g/icu-support/c/IJBZUe3T4WY).

GMT gives the standard's answer in every case.

## What kind of bugs are these?

These are the bugs we found. They are rare edge cases. Most only show up:

- near the very first or very last date Temporal can represent (around the year 275,000);
- in non-Gregorian calendars, such as Hebrew, Persian, Islamic or Japanese;
- in time zone history from before the 1850s; or
- in a time zone whose clocks changed twice within a few weeks, such as `Africa/El_Aaiun` in 1976.

Temporal is a large, carefully designed standard, and the polyfill is a big piece of work.
Finding bugs like these is normal. We found them because GMT tests the unusual corners that
most code never reaches.

We sent them to three places:

- **The runtime GMT is on** ([`fullcalendar/temporal-polyfill`](https://github.com/fullcalendar/temporal-polyfill)).
  Every bug we reported there is fixed.
- **The polyfill GMT ran on before** ([`js-temporal/temporal-polyfill`](https://github.com/js-temporal/temporal-polyfill)),
  the package that many other projects install. Some of its fixes are already written but
  not yet in a published release, so we've asked for a new release. That would also fix two
  bugs other users had already reported.
- **The Temporal proposal** ([`tc39/proposal-temporal`](https://github.com/tc39/proposal-temporal)),
  which has its own reference copy of the same code. Where a bug exists there too, we reported
  it with the same fix, so it's corrected at the source. We also asked one question about the
  standard's own text: it refuses a string that it writes itself, for a few hours at the very
  start of the range.

## How we check each fix

- The correct answer comes from the Temporal standard, its official test suite (test262) and the
  Temporal built into Chrome. We never use the polyfill's own answer as the reference.
- Each fix is tested on a real build of the polyfill, with and without the change, using the
  exact example in the report.
- We also check that the fix doesn't change any answer that was already right.

Every example and fix is written up in full in GMT's repository:
[`js-temporal-polyfill-bugs.md`](https://github.com/northguild/gmt/blob/main/context/domination/js-temporal-polyfill-bugs.md)
for the `@js-temporal/polyfill` reports, and
[`temporal-polyfill-swap.md`](https://github.com/northguild/gmt/blob/main/context/domination/research/temporal-polyfill-swap.md)
for the `temporal-polyfill` reports and the comparison.

See also: [Why GMT?](/gmt/why-gmt/) · [Correct at the edges](/gmt/guides/concepts/correct-at-the-edges/) ·
[Standards](/gmt/guides/concepts/standards/)
