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

date-light

v0.1.3

Published

Zero-dependency, ~2.19KB minzipped, fully typed date utility library — 39 functions covering the 20 most-used date-fns operations

Readme

date-light

CI Test npm version coverage License: MIT TypeScript

The date helpers you actually ship. Nothing else.

39 fully typed date utilities in ~2.19 KB minzipped. Zero dependencies. Immutable by default.

Install · Why date-light? · Docs · API


Why date-light?

Most apps only need a small, predictable slice of date-fns: format a date, parse input, add a few days, compare ranges, snap to day/week/month boundaries.

date-light keeps that slice tiny:

  • 2.19 KB minzipped for 39 common utilities
  • Zero runtime dependencies
  • TypeScript-first with generated declarations
  • Immutable functions that never mutate input dates
  • date-fns-style API surface for the common calls people reach for most
  • ESM + CJS package entrypoints verified before release
import { addDays, differenceInDays, format, startOfWeek } from "date-light";

const launch = new Date(2026, 5, 30, 14, 30);
const reminder = addDays(launch, -7);

format(launch, "yyyy-MM-dd HH:mm"); // "2026-06-30 14:30"
format(startOfWeek(launch), "yyyy-MM-dd"); // "2026-06-29"
differenceInDays(launch, reminder); // 7

Install

npm install date-light
yarn add date-light
pnpm add date-light
bun add date-light

Works in Node.js 18+ and modern browsers.

What You Get

import {
  format,
  parseISO,
  addDays,
  addMonths,
  differenceInDays,
  isBefore,
  isWeekend,
  startOfDay,
  endOfMonth,
} from "date-light";

| Area | Utilities | | -------------- | --------------------------------------------------------------- | | Format & parse | format, parseISO, parse | | Add & subtract | addDays, addMonths, addYears, addHours, subDays, more | | Differences | differenceInDays, differenceInMonths, differenceInYears | | Compare | isBefore, isAfter, isEqual, isSameDay, isSameMonth | | Query | isWeekend, isLeapYear, isValid, getDaysInMonth | | Start & end | startOfDay, endOfWeek, startOfMonth, endOfYear, more |

Full list: API Reference

The Tradeoff

date-light is intentionally not a calendar platform. It does not include locales, timezone databases, duration objects, plugins, or chainable wrappers.

That is the point. For those jobs, use Intl, Temporal, Luxon, or date-fns directly. For common app date utilities, keep the dependency small.

Size

| Library | minzipped | Note | | ----------------------- | ----------- | ---------------------------------- | | date-light | 2.19 KB | 39 functions, fully tree-shakeable | | dayjs | 2.97 KB | Core only | | date-fns (20 functions) | 18.34 KB | Same common-operation comparison | | date-fns (full) | 261.3 KB | Full package |

date-light (39 functions) is 8.4x smaller than importing 20 comparable date-fns functions and 1.4x smaller than dayjs core.

Documentation

License

MIT 2026


Security Policy · Changelog · Code of Conduct · Contributing