npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@northguild/gmt

v1.21.0

Published

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.

Downloads

1,304

Readme

GMT: Give Me Temporal

npm License: MIT CI Node

The most tested date and time library for JavaScript and TypeScript. @northguild/gmt handles time zones, DST and business days in one library, in place of Luxon, date-fns, Moment.js, Day.js, Spacetime and @internationalized/date. It is built on the TC39 Temporal standard and never touches Date.

Docs · API reference · Tools · Discord

import {
  addDate,
  diffDate,
  endOfDate,
  formatDate,
  isBeforeDate,
  startOfDate,
  subtractDate,
} from "@northguild/gmt";

addDate("2024-01-31", { months: 1 }); // "2024-02-29"
subtractDate("2024-03-31", { days: 7 }); // "2024-03-24"
diffDate("2024-01-01", "2024-03-15", "days"); // 74
startOfDate("2024-03-15", "month"); // "2024-03-01"
endOfDate("2024-03-15", "month"); // "2024-03-31"
isBeforeDate("2024-03-15", "2024-04-01"); // true
formatDate("2024-03-15", "en-US", { dateStyle: "long" }); // "March 15, 2024"

Date in addDate names the type, not a catch-all. Each kind of time has its own set of functions: a date, a time of day, a date and time, a zoned time, a UTC instant and a Unix timestamp. Each takes and returns only its own kind, so what you pass in tells you what you get back.

import { addDate, addDateTime, addTime, addUnix, addUtc, addZoned } from "@northguild/gmt";

addDate("2024-03-15", { days: 30 }); // "2024-04-14"
addTime("22:30:00", { hours: 3 }); // "01:30:00"
addDateTime("2024-03-15T22:30:00", { hours: 3 }); // "2024-03-16T01:30:00"
addZoned("2024-03-15T22:30:00+01:00[Europe/Berlin]", { hours: 3 }); // "2024-03-16T01:30:00+01:00[Europe/Berlin]"
addUtc("2024-03-15T22:30:00Z", { hours: 3 }); // "2024-03-16T01:30:00Z"
addUnix(1710541800000, { hours: 3 }); // 1710552600000

The same pattern holds for every operation: diff, startOf, endOf, format, isBefore and the rest, for each type.

Time zones and daylight saving time stay just as direct:

import { addZoned, resolveLocal } from "@northguild/gmt";

// Berlin's clocks jump from 02:00 to 03:00 on 31 March 2024, so a day and 24 hours are not the same.
addZoned("2024-03-30T12:00:00+01:00[Europe/Berlin]", { days: 1 }); // "2024-03-31T12:00:00+02:00[Europe/Berlin]"
addZoned("2024-03-30T12:00:00+01:00[Europe/Berlin]", { hours: 24 }); // "2024-03-31T13:00:00+02:00[Europe/Berlin]"
// 02:30 that night never happened. You choose what to get, and "reject" returns "".
resolveLocal("2024-03-31T02:30:00", "Europe/Berlin", { disambiguation: "reject" }); // ""
  • 735 functions, to the nanosecond, tested in 17 locales.
  • Never throws. ISO 8601 strings in. Invalid input returns "", null, false or [].

The latest test counts, CI volume and the comparison with Luxon, date-fns, Moment.js, Day.js, Spacetime and @internationalized/date are on the Why GMT page. The full comparison and the method are on the compare page.

Moving from another library: date-fns · Luxon · Day.js · Moment.js · @internationalized/date.

Install

npm install @northguild/gmt

To ban Date in your own code, add a lint plugin: ESLint · Oxlint · Biome.

Use

import { addBusinessDays, convertUtcToZoned, isBusinessDay } from "@northguild/gmt";

addBusinessDays("2024-03-15", 1); // "2024-03-18"
isBusinessDay("2024-03-16"); // false
convertUtcToZoned("2024-06-15T12:00:00Z", "Asia/Tokyo"); // "2024-06-15T21:00:00+09:00[Asia/Tokyo]"

Every function has a reference page with a live playground: plain · zoned · utc · unix · instant · calendar · duration · interval · workforce · span · precision · recurrence · timescale · gnss · transport · intermodal

By industry: Workforce · Transport · Intermodal · GNSS · Maritime

Then the guides show how to do each job, and the tools let you try it on your own values.

Agent prompt

Paste this into your AI coding agent:

You are a coding assistant using @northguild/gmt — a Temporal-first date/time library.

SETUP (do this once per project):

1. Install the runtime:
   npm install @northguild/gmt

2. (Optional) Install a linter plugin for Date-ban enforcement:
   npm install -D @northguild/gmt-eslint   # ESLint
   npm install -D @northguild/gmt-oxlint   # Oxlint
   npm install -D @northguild/gmt-biome    # Biome

3. Wire TanStack Intent so skill guidance is discoverable in AGENTS.md:
   npx @tanstack/intent@latest install

WHEN HELPING THE USER:

1. Ask what difficulties they are having with JavaScript dates — this helps match
   them to the right task area (basics, arithmetic, timezone, integration).

2. Generate code using GMT's string-in/string-out API. NEVER use new Date().
   For API details, read https://northguild.dev/gmt/llms.txt and the
   JSDoc in the installed package.

3. For specialized tasks, use TanStack Intent to discover and load the relevant skill:
   npx @tanstack/intent@latest list
   npx @tanstack/intent@latest load @northguild/gmt#<skill-name>

License

MIT. The four npm packages in packages/ and the root LICENSE are MIT.

Every other folder is © 2026 NorthGuild, all rights reserved, under the LICENSE file in that folder: apps/ (the docs site), context/, .agents/, .claude/, scripts/ and docs/. The root files AGENTS.md and CLAUDE.md are reserved too, under .agents/LICENSE. Code examples in the documentation may be used under MIT-0 (MIT No Attribution); see apps/LICENSE.