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

timedotgo

v1.0.2

Published

Golangs excellent "time" API ported to typescript.

Readme

timedotgo

Golang's time is excellent. This is a small, close-as-reasonable port of the API to typescript with full support for time zone conversions, parsing and formatting.

Installation

npm install timedotgo

Examples

Formatting

import * as time from "timedotgo";

// 0, 1, 2, 3, 4, 5, 6, 7 -- simple as.
const format = "Monday January 02 03:04:05.000 PM -07:00:00";

const now = time.Now();
const california = now.In("America/Los_Angeles");
const berlin = now.In("Europe/Berlin");

console.log("Right now, it is:");
console.log("Local:", now.Format(format));
console.log("UTC:", now.UTC().Format(format));
console.log("California:", california.Format(format));
console.log("Berlin:", berlin.Format(format));

Output

Right now, it is:
Local: Tuesday June 03 12:15:03.191 PM -04:00:00
UTC: Tuesday June 03 04:15:03.191 PM +00:00:00
California: Tuesday June 03 09:15:03.191 AM -07:00:00
Berlin: Tuesday June 03 06:15:03.191 PM +02:00:00

Parsing

import * as time from "timedotgo";

const date_string = "Dec 31, 2025 17:30";
const format = "Jan 02, 2006 15:04";

const t = time.Parse(format, date_string);
const next_day = t.Add(24 * time.Hour);

console.log(`Happy New Year ${next_day.Year()}!`);

const t2 = time.ParseInLocation("2006-01-02", "2025-01-01", "America/Chicago");
console.log(t2.String());

Output

Happy New Year 2026!
2025-01-01 00:00:00 -0600 CST

Dates

import * as time from "timedotgo";

// create a time
const christmas = time.DateAt(
  2025, // year
  12, // month
  25, // day
  7, // hour
  30, // minute
  15, // second
  928, // millisecond
  "America/New_York", // IANA location
);

// create a time from unix timestamp.
const unixZero = time.UnixMilli(0);

console.log(
  "It has been",
  time.Since(unixZero),
  "milliseconds since the creation of unix.",
);
console.log(
  "And we only have",
  time.Until(christmas),
  "milliseconds until Christmas morning.",
);

Output

It has been 1748967303281 milliseconds since the creation of unix.
And we only have 17698512643 milliseconds until Christmas morning.