@northguild/gmt
Give Me Temporal
Current release: v1.23.1
@northguild/gmt is built on the published standards for dates and times, not on a
library’s own idea of them: TC39 Temporal for the
types and arithmetic, ISO 8601
and RFC 9557 for every string in and out, and
the IANA Time Zone Database for zones. On top of that sits a smaller, opinionated API for
what application code actually needs — arithmetic, comparison, parsing, formatting, unix
conversions, timezone conversion and validation — tested against those standards and exact
to the nanosecond at the edges of Temporal’s range. No hardcoded offset tables, no Date object: every zone on
the globe is computed live in your browser and recomputed every second.
Built on the standards
Published standards decide every answer, not a library’s own idea.
TC39 Temporal
The standard JavaScript date API. No
Date, enforced by lint.ISO 8601 · RFC 9557
Standard strings in and out, zones annotated.
IANA zones · CLDR
Real zone ids and the locale data your runtime ships.
Explicit DST
Gaps and overlaps resolve the way you choose.
World calendars
Hebrew, Islamic, Japanese, Persian and more.
Freight formats
EDIFACT, X12 and EPCIS. Never an invented offset.
Tested and precise
Checked against the specs themselves, exact to the nanosecond.
No borrowed oracle
Answers come from the specs and test262, never the polyfill.
~2× more CI runs
2,350,440 executions, against 6 libraries combined.
Correct at the edges
Midnight, DST and the range limits are named tests.
Safeguards
Invalid input is validated, not thrown at your app.
Nanoseconds
Exact
biginttime. The others stop at milliseconds.Zero known bugs
None of 78,348 tests skipped or expected to fail.
The bug is the Date object
Date mixes an instant with a wall-clock reading, and mutates in place.
new Date("2025-01-15")Tue Jan 14 2025 19:00 GMT−5new Date("2025-03-30T01:30")02:30 — no errornew Date(2025, 3, 1)April 1, not March 1d.setDate(d.getDate() + 1)mutates d in placesame code, two machinestwo different answers
The alternatives inherit it
Popular libraries decorate Date, so its faults come along.
TemporalTC39 standard@northguild/gmtTemporal insideDateroot causeLuxonbuilt on Datedate-fnsbuilt on DateMoment.jsbuilt on DateDay.jsbuilt on DateSpacetimeleans on Date@internationalized/datenot TC39