The date helpers you actually ship. Nothing else.
39 fully typed date utilities in ~3.11 KB minzipped. Zero dependencies. Immutable by default.
Install · Why date-light? · Docs · API
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:
- 3.11 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); // 7npm install date-lightyarn add date-light
pnpm add date-light
bun add date-lightWorks in Node.js 18+ and modern browsers.
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
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.
| Library | minzipped | Note |
|---|---|---|
| date-light | 3.11 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 5.9x smaller than importing 20 comparable date-fns functions and remains close to dayjs core size while covering a broader utility surface.
MIT 2026
Security Policy · Changelog · Code of Conduct · Contributing