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

infinite-unixtime

v1.1.4

Published

Infinite(Unlimited) Unixtime - ignore LMT(Local mean time)

Readme

Infinite Unixtime

Online Demo

Quick Start

npm install infinite-unixtime

CDN Build Example

<script src="./infinite-unixtime-1.1.4.min.js"></script>
<pre id="result"></pre>
<script type="text/javascript">
    // If 'Unixtime' is already in use, you can use '$Unixtime' instead.
    // Example
    let w = '';
    w += Unixtime.now() + '\n'
    w += Unixtime.fromMillis(123456333242347890123) + '\n'
    // 23948923423421773421234-01-31T00:00:00.000Z
    w += Unixtime.fromUtc(23948923423421773421234n, 1, 31).toIsoStringUtc() + '\n';
    // -3472472928838222222282881717114-12-31T14:59:59.999Z
    w += Unixtime.from(-3472472928838222222282881717114n, 12, 31, 23, 59, 59, 999).toIsoStringUtc() + '\n';
    document.getElementById('result').innerText = w;
</script>

Features

  • Infinite Time Support
console.log(Unixtime.fromUtc(23948921773421234n, 1, 31).toIsoStringUtc());
console.log(Unixtime.from(-3472472928838282881717114n, 12, 31).toIsoStringUtc());
  • Ignore LMT(Local mean time)
  • Guarantees a consistent timezone offset across all eras, bypassing the historic LMT shifts often found in native environment implementations.
// Example: Asia/Seoul (+09:00)

// Native JavaScript Date applies LMT for older dates
new Date(2000, 0, 1)
// -> Sat Jan 01 2000 00:00:00 GMT+0900 (Korean Standard Time)
new Date(1900, 0, 1)
// -> Mon Jan 01 1900 00:00:00 GMT+0827 (Korean Standard Time)
// Note the +08:27 LMT shift

// Unixtime maintains the same timezone offset consistently
Unixtime.from(2000, 1, 1).toString()
// -> 2000-01-01 (Sat) AM 00:00 00.000 +09:00
Unixtime.from(1900, 1, 1).toString()
// -> 1900-01-01 (Mon) AM 00:00 00.000 +09:00
// Maintain Same Timezone

Example

From unixtime (milliseconds / seconds)

let u = Unixtime.fromMillis(0);
assert.equal(u.toIsoStringUtc(), '1970-01-01T00:00:00.000Z');
assert.equal(u.toIsoString(-540), '1970-01-01T09:00:00.000+09:00');
assert.equal(u.toIsoString(-720), '1970-01-01T12:00:00.000+12:00');
assert.equal(u.toIsoString(720), '1969-12-31T12:00:00.000-12:00');
console.log(u.toIsoStringUtc());
console.log();

u = Unixtime.fromSeconds(0);
assert.equal(u.toIsoStringUtc(), '1970-01-01T00:00:00.000Z');
assert.equal(u.toIsoString(-540), '1970-01-01T09:00:00.000+09:00');
assert.equal(u.toIsoString(-720), '1970-01-01T12:00:00.000+12:00');
assert.equal(u.toIsoString(720), '1969-12-31T12:00:00.000-12:00');
console.log(u.toIsoStringUtc());

u = Unixtime.fromMillis(0);
console.log(u.toIsoStringUtc());
u = Unixtime.fromMillis(-1);
console.log(u.toIsoStringUtc());

From date

let u = Unixtime.from(1969, 12, 31)
console.log(u.toIsoStringUtc());
console.log();

u = Unixtime.from(1969, 12, 30)
console.log(u.toIsoStringUtc());
console.log();

u = Unixtime.fromUtc(0, 1, 1);
assert.equal(u.timestamp, -62167219200000n)
assert.equal(u.getWeekShort(0), 'Sat')
console.log(u.toIsoStringUtc());
console.log();

u = Unixtime.fromUtc(-2, 12, 31, 23, 59, 59);
assert.equal(u.timestamp, -62198755201000n)
assert.equal(u.getWeekShort(0), 'Thu')
console.log(u.toIsoStringUtc());
console.log();

u = Unixtime.fromUtc(-4, 2, 29, 23, 59, 59);
assert.equal(u.timestamp, -62288265601000n)
assert.equal(u.getWeekShort(0), 'Thu')
console.log(u.toIsoStringUtc());
console.log();

u = Unixtime.fromUtc(-2000, 2, 29, 23, 59, 59);
assert.equal(u.timestamp, -125275939201000n)
assert.equal(u.getWeekShort(0), 'Tue')
console.log(u.toIsoStringUtc());
console.log();

u = Unixtime.fromUtc(-2000, 3, 1, 0, 0, 0);
assert.equal(u.timestamp, -125275939200000n)
assert.equal(u.getWeekShort(0), 'Wed')
console.log(u.toIsoStringUtc());
console.log();

Now

let u = Unixtime.now();
console.log('string', u.toString())
console.log('string', u.toString())
console.log('datetime', u.toDateTimeDetail())
console.log('time', u.timestamp)
assert.equal(u.toIsoStringUtc(), u.toIsoString(0));
console.log();

Format

let u = Unixtime.now();
u = Unixtime.now();
console.log(u.format(`yyyy yy MM dd HH hh mm ss SSS XXX a e EE E 'yyyy escape'`));
// 2026 2026 05 19 21 09 17 35 183 +09:00 PM 2 Tuesday Tue yyyy escape
console.log(u.format(`yyyy yy MM dd HH hh mm ss SSS XXX a e EE E 'yyyy escape'`, -60));
// 2026 2026 05 19 13 01 17 35 183 +01:00 PM 2 Tuesday Tue yyyy escape
console.log(u.formatUtc(`yyyy yy MM dd HH hh mm ss SSS XXX a e EE E 'yyyy escape'`));
// 2026 2026 05 19 12 12 17 35 183 Z PM 2 Tuesday Tue yyyy escape