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

datezone

v1.0.7

Published

A lightweight and comprehensive date and timeZone utility library for JavaScript.

Readme

datezone

Coverage Tests Performance

Bun TypeScript License: MIT

Star on GitHub Sponsor

🚀 Why Datezone?

  • Extreme Performance: Up to 1,000x faster than date-fns for timeZone operations (see benchmarks)
  • Faster by Design: Uses timestamp math instead of creating Date objects, minimizing allocations and saving work for the garbage collector
  • Timezone-First: All functions accept an optional timeZone parameter
  • Zero Unnecessary Objects: Avoids creating Date objects unless needed
  • Tree-Shakeable: Import only what you need
  • Pure & Typed: No side effects, strict TypeScript types
  • Modern: Built on the Intl API for accuracy and speed

Installation

# Bun
bun add datezone

# pnpm
pnpm add datezone

# npm
npm install datezone

Quick Start

import { startOfDay, addDays, format } from "datezone";
const now = Date.now();
const startNY = startOfDay(now, "America/New_York");
const tomorrow = addDays(now, 1, "Europe/London");
const formatted = format(now, "yyyy-MM-dd HH:mm:ss zzzz", { locale: "en", timeZone: "America/New_York" });

API Reference

See Docs for all exports and usage.

Performance

| Operation | Datezone | date-fns | Improvement | |-----------|----------|----------|-------------| | addDays (DST) | 3.9M ops/sec | 174.0K ops/sec | +2150% | | startOfDay (DST) | 2.3M ops/sec | 186.5K ops/sec | +1150% | | endOfDay (DST) | 2.4M ops/sec | 188.7K ops/sec | +1158% | | dayOfYear (DST) | 16.4M ops/sec | 40.2K ops/sec | +40630% | | format (DST) | 911.4K ops/sec | 114.6K ops/sec | +695% | | addMonths (DST) | 2.1M ops/sec | 106.7K ops/sec | +1833% | | addWeeks (DST) | 2.0M ops/sec | 178.0K ops/sec | +1001% | | addYears (DST) | 8.5M ops/sec | 106.5K ops/sec | +7868% | | intervalToDuration (DST) | 2.5M ops/sec | 11.5K ops/sec | +21971% |

Summary:

  • Datezone wins: 77 operations (87.5%)
  • date-fns wins: 5 operations (5.7%)
  • Close matches: 6 operations (6.8%)

See the full performance report → for all details and methodology.

Why Choose Datezone?

| vs. date-fns | vs. Luxon/Day.js | vs. Temporal | |--------------|------------------|-------------| | ✅ Much faster timeZone ops | ✅ No object wrappers | ✅ Available today | | ✅ Explicit timeZone handling | ✅ Tree-shakeable | ✅ Proven performance | | ✅ Modern Intl API | ✅ Smaller bundle size | |

Contributing

See our Contributing Guide.

License

MIT


⭐ Star us on GitHub if Datezone makes your app faster!