GMT and the other libraries
This page sets GMT beside 6 other date libraries: what each one’s own test suite and CI run, what each is built on, and what each covers. Every figure can be checked. The second section names the version, commit, date and command behind it.
The summary on Why GMT? draws charts from the same data.
For what each library returns on the same inputs, see Behaviour of date libraries against Temporal.
The full table
Section titled “The full table”@northguild/gmt
- Test cases
- 78,184
- CI test executions
- 2,345,520
- Node versions in CI
- 3 (22, 24, 26)
- Time zones
- 10
- Locales
- 17
- Known failing tests
- 0
- Fails in our zone matrix
- 0
- Built on
- TC39 Temporal
- Finest time unit
- Nanosecond
@internationalized/date
- Test cases
- 386
- CI test executions
- 386
- Node versions in CI
- 1
- Time zones
- 0
- Locales
- 0
- Known failing tests
- 0
- Fails in our zone matrix
- 0
- Built on
- not TC39
- Finest time unit
- Millisecond
Luxon
- Test cases
- 1,222
- CI test executions
- 4,888
- Node versions in CI
- 4
- Time zones
- 0
- Locales
- 0
- Known failing tests
- not measured
- Fails in our zone matrix
- 7 (7 assume one zone, 0 wrong answers)
- Built on
- built on Date
- Finest time unit
- Millisecond
date-fns
- Test cases
- 3,167
- CI test executions
- 1,209,794
- Node versions in CI
- 4
- Time zones
- 378
- Locales
- 0
- Known failing tests
- 0
- Fails in our zone matrix
- 0
- Built on
- built on Date
- Finest time unit
- Millisecond
Moment.js
- Test cases
- 3,944
- CI test executions
- 11,832
- Node versions in CI
- 3
- Time zones
- 0
- Locales
- 140
- Known failing tests
- 0
- Fails in our zone matrix
- 8 (0 assume one zone, 8 wrong answers)
- Built on
- built on Date
- Finest time unit
- Millisecond
Day.js
- Test cases
- 794
- CI test executions
- 1,034
- Node versions in CI
- 1
- Time zones
- 6
- Locales
- 42
- Known failing tests
- 1
- Fails in our zone matrix
- 5 (5 assume one zone, 0 wrong answers)
- Built on
- built on Date
- Finest time unit
- Millisecond
Spacetime
- Test cases
- 8,910
- CI test executions
- 43,698
- Node versions in CI
- 5
- Time zones
- 22
- Locales
- 6
- Known failing tests
- 0
- Fails in our zone matrix
- 0
- Built on
- leans on Date
- Finest time unit
- Millisecond
How to read the columns:
- Test cases is the number of tests in one run of the library’s own suite.
- CI test executions is the test cases multiplied by every Node version and time-zone run the library’s own CI applies.
- Time zones: for GMT, the zones the whole suite runs in. For the others, the zones their dedicated time-zone and DST test files cover. A 0 means none was found.
- Locales: for GMT, the locales every locale-aware function is tested in. For the others, the locale test files their repository holds.
- Known failing tests counts tests that fail on the library’s own default branch. “Not measured” means the figure was not taken. Failures caused by the measuring machine are not counted here; see the notes below.
- Fails in our zone matrix counts the tests of the library’s own suite that fail when it runs in the time zones GMT’s CI uses, split into tests that assume one zone and wrong answers. See the zone matrix.
How these were measured
Section titled “How these were measured”Each figure for the other libraries is a snapshot taken on the date in the table, between
2026-11-11 and 2026-11-11. Libraries change their tests and
CI, so check the date before you cite a figure. GMT’s own figures are not a snapshot:
scripts/stats.mjs regenerates them from this repository on every change, and the build
fails if a published figure drifts from the repository.
@northguild/gmt
- Version tested
- this repository
- Repository and commit
- this repository
- Measured on
- every change
- Command
- collected from the suite by scripts/stats.mjs
- CI configuration
.github/workflows/ ci.yml
@internationalized/date
- Version tested
- 3.12.4
- Repository and commit
adobe/react-spectrum@d354aa2 - Measured on
- 2026-11-11
- Command
npx jest packages/@internationalized/ date/ tests/ - CI configuration
- adobe/react-spectrum/blob/main/.circleci/config.yml
Luxon
- Version tested
- 3.7.2
- Repository and commit
moment/luxon@f427515 - Measured on
- 2026-11-11
- Command
jest- CI configuration
- moment/luxon/blob/master/.github/workflows/test.yml
date-fns
- Version tested
- 4.4.0
- Repository and commit
date-fns/date-fns@a9739fb - Measured on
- 2026-11-11
- Command
pnpm vitest run --project main- CI configuration
- date-fns/date-fns/tree/main/.github/workflows
Moment.js
- Version tested
- 2.31.0
- Repository and commit
moment/moment@c2a703a - Measured on
- 2026-11-11
- Command
node scripts/test.js - CI configuration
- moment/moment/tree/develop/.github/workflows
Day.js
- Version tested
- 1.11.23
- Repository and commit
iamkun/dayjs@d3e43be - Measured on
- 2026-11-11
- Command
npm test- CI configuration
- iamkun/dayjs/blob/dev/.github/workflows/lint-test.yml
Spacetime
- Version tested
- 7.17.1
- Repository and commit
spencermountain/spacetime@35fbb59 - Measured on
- 2026-11-11
- Command
pnpm run test- CI configuration
- spencermountain/spacetime/tree/master/.github/workflows
Test cases for each library were obtained by cloning its repository at the commit shown, installing its dependencies, running the project’s own test command, and reading that runner’s final summary. They were not counted from the source. CI test executions come from each project’s public CI configuration, linked in the last column: the test count multiplied by the Node versions and time-zone runs that configuration applies.
The notes below record how each library’s figures were reached, and what a reader needs to read them correctly.
- @internationalized/date. All 386 tests passed. The suite runs once: CI tests React 16 to canary, not a range of Node versions. The 12 methods on the Calendar interface are counted once, not again on each of its 13 implementations.
- Luxon. CI (.github/workflows/test.yml) runs
npm run teston Node 20, 22, 24 and 25 under one fixed time zone, America/New_York, so executions are 1,222 × 4. The 46 local failures come from the machine: the suite assumes its CI container's local time zone is America/New_York. They do not change the test count. Luxon ships no types, so the API was counted from @types/luxon 3.7.6, which tracks 3.7.x. - date-fns. The suite runs the
mainVitest project. CI (node_tests.yaml) runs it on Node 22, 24, 25 and 26, so that part is 3,167 × 4. A second workflow (tz_tests.yaml) runs the same 3,167 tests under all 378 time-zone settings of its own tool, so executions are 3,167 × 4 + 3,167 × 378 = 1,209,794. All 378 zones passed. Thetemporarilyproject is not run by CI and is not counted.formatis an alias ofDate format, counted once. The 1 method is the function-typed member of the exported Localize type. - Moment.js. 0 tests failed on Node 24. CI (.github/workflows/ci.yml) runs
pnpm teston three Node versions (lts/*, lts/-1, latest), so executions are 3,944 × 3. timezones.yml re-runs 5 test modules, not the full suite, under 6 zones; those partial runs are not counted. The repository holds 193 test files;localescounts the 140 of them that test a locale. - Day.js. A single default run is 93 suites and 794 tests. 793 pass and 1 fails: the failure is in the upstream code and also appears at the earlier commit, so it is counted under known failures. The repository's
testscript first re-runs test/timezone.test.js (6 tests) and test/plugin/timezone.test.js (54 tests) under 6 distinct TZ values (Pacific/Auckland, Europe/London, America/Whitehorse, the system default, Europe/Paris, America/New_York), then runs the full jest suite: 4 × 6 + 4 × 54 + 794 = 1,034 executions.localescounts test/locale.test.js plus the 41 files in test/locale/. CI runsnpm teston a single Node LTS. The API count covers the core and the 37 plugins shipped in the same npm package; core alone is 4 functions and 30 methods. The commit is on thedevbranch, wherepackage.jsoncarries the placeholder version0.0.0-development: itssrc,testandtypestrees are the same as those of the tag v1.11.23. - Spacetime. All 8,910 tests passed. CI runs Node 20, 22, 24, 25 and 26 (the suite has 8,697 tests on the four older versions and 8,910 on the newest), so executions are 4 × 8,697 + 8,910 = 43,698.
localescounts the 6 locale test files.timezonescounts the 22 dedicated time-zone and DST test files that run. Thespacetime/temporalentry point is not counted in the API.
What each library covers
Section titled “What each library covers”GMT is compared with @internationalized/date, Luxon, date-fns and Moment.js
capability by capability. Day.js and Spacetime have not been compared this way, so the
last column names only those four (and temporal-kit, a package for business-day
arithmetic). Where it says “None of the others”, it means none of those four.
| Capability | GMT | Also has it |
|---|---|---|
| Duration type (ISO 8601 parse, format, arithmetic) | Yes | Luxon Duration |
| Interval and range math (contains, overlap, union, intersection, split, set operations) | Yes | Luxon Interval, date-fns areIntervalsOverlapping |
| DST disambiguation control on construction and on arithmetic | Yes | None of the others exposes this on arithmetic |
| Locale-aware calendar helpers (weekend, week start and end, day of week) | Yes | @internationalized/ |
| Business-day arithmetic with holiday calendars and roll conventions, clamp and closest, time rounding | Yes | temporal-kit (arithmetic only) |
| Interval rounding-out (boundary count, from a duration) | Yes | Luxon |
Locale calendar metadata (names, hasDST) | Yes | Luxon Info |
| Overlap-day count, relative rounding, DST transitions, hours in a day | Yes | date-fns, @internationalized/ |
| Field setters, token-pattern parsing, named machine formats, calendar-style formatting | Yes | Luxon .set(), toRFC2822, toHTTP and toSQL; Moment .calendar() |
| Non-Gregorian calendar systems (conversion and calendar-aware interval and duration math) | Yes | @internationalized/'s toCalendar |
The alternatives inherit it, or deviate from the standard
The popular libraries do not replace Date; they decorate it, so the faults come along — our gmt lint packages ban the Date wrappers below outright. The one library that fixes the model does it with a non-standard API you will migrate off. GMT is Temporal — the standard — with the ergonomics added on top.
- TemporalThe TC39 standard. Separate types for instants, wall-clock times, zoned times, plain dates, and durations. No Date anywhere.TC39 standard
- @northguild/gmtTemporal underneath, with an ISO 8601 string-in / typed-value-out surface on top. The layer you actually write against.Temporal inside
- DateEpoch milliseconds interpreted through the host timezone. Every fault above lives here.root cause
- LuxonA DateTime is a Date plus a zone string. Invalid inputs become an Invalid DateTime you have to remember to check for.built on Date
- date-fnsTree-shakeable functions — but every argument and every return value is a Date, so all of its footguns are still yours. Our gmt lint packages also ban the companion date-fns-tz, @date-fns/tz packages.built on Date
- Moment.jsA wrapper around Date. In legacy maintenance mode since 2020, and mutable like the thing it wraps. Our gmt lint packages also ban the companion moment-timezone package.built on Date
- Day.jsWraps a real Date instance under the hood. Its timezone plugin is graded against moment's output — it can't verify itself without the library it replaces.built on Date
- Spacetimenow()/today() default through Date.now(), the system clock. Its own suite passes in full.leans on Date
- @internationalized/dateIts own CalendarDate / ZonedDateTime types. Fixes the model, but it is Adobe's API — a second migration once Temporal ships.not TC39
Where GMT differs
Section titled “Where GMT differs”Each row says what GMT does and what each other library’s measurement shows. The rows name every library instead of saying “only GMT”, because a claim of that kind must hold against all 6 libraries in the data.
| Topic | GMT | What each other library's measurement shows |
|---|---|---|
| Time zones | The whole suite runs in each of 10 zones on each of 3 Node versions: 30 full-suite runs | @internationalized/date has no time-zone matrix in its CI. Luxon has no time-zone matrix in its CI. date-fns re-runs its whole suite under 378 time-zone settings. Moment.js re-runs 5 time-zone test modules under 6 zones, not the full suite. Day.js re-runs 2 time-zone test files under 6 zones, not the full suite. Spacetime has 22 time-zone test files, run once per Node version. |
| Locales | 17 locales, run inside the 78,184 tests so that every locale-aware function meets all of them | @internationalized/date has no locale tests. Luxon has no locale tests. date-fns has no locale tests. Moment.js has 140 locale test files. Day.js has 42 locale test files. Spacetime has 6 locale test files. |
| What it is built on | TC39 Temporal. Lint packages for ESLint, Oxlint and Biome ban Date in your own code | @internationalized/date: not TC39. Luxon: built on Date. date-fns: built on Date. Moment.js: built on Date. Day.js: built on Date. Spacetime: leans on Date. |
| CI test executions | 2,345,520 | All 6 other libraries combined: 386 + 4,888 + 1,209,794 + 11,832 + 1,034 + 43,698 = 1,271,632. GMT's figure is about 2 times that |
Executions are test cases multiplied by the Node versions and time-zone runs CI applies. A library with a larger suite but a single run can still execute fewer tests than GMT does. The multiple is GMT’s 2,345,520 divided by 1,271,632, the executions of all 6 other libraries added together: about 2 times.
How GMT’s own suite is designed
Section titled “How GMT’s own suite is designed”GMT’s suite balances thoroughness against maintenance by testing behavior, not permutations.
What it tests exhaustively
- The locale matrix. Every locale-aware function runs in all 17 locales of the matrix: en-US, en-GB, de-DE, fr-FR, es-ES, it-IT, pt-PT, sv-SE, is-IS, zh-CN, zh-TW, ja-JP, ko-KR, ar-SA, he-IL, ru-RU, tr-TR. The set covers script direction, first-day-of-week differences and calendar metadata.
- The time-zone matrix. Every zoned function runs in 10 IANA time zones that span every UTC offset band, from Pacific/Niue (UTC−11) to Pacific/Chatham (UTC+13:45). The set includes zones with DST transitions and zones at half-hour offsets.
- Zero-length and identity cases. Every interval and arithmetic function is tested with zero-length inputs, identity operations and values next to a boundary.
- Invalid-input sentinels. Every public function is tested for its documented fallback
(
"",null,falseor[]) on malformed strings, wrong types, leap seconds and inverted intervals.
What it collapses
- Non-string input tables. A function that guards with
typeof x !== "string"returns the same sentinel fornull,undefined,123,true,[]and{}. The suite tests one representative non-string per argument position, not every type at every position. That is safe because every non-string type reaches the same early return. - Repeated permutations. Adjacent, disjoint and reversed interval cases that give
identical results are not repeated for every function variant. The
plain,zoned,utcandunixfamilies share the same mathematical behavior, so each family gets the fewest cases that prove it.
The result. 78,184 tests in 1,034 files. CI runs them as 2,345,520 executions: every test, in 3 Node versions and 10 time zones, which is 30 runs of each test.
© 2026 NorthGuild · Licences
Code examples: MIT-0. Packages: MIT. Third-party data and components: their own licences, credited where they appear. Everything else: © 2026 NorthGuild, all rights reserved.