Date Libraries

Until Temporal reaches every browser, libraries fill the gaps in Date. Moment.js 47,906 , once the default, is a legacy project in maintenance mode; all three successors below are MIT-licensed.

Popular open-source date libraries
Library (npm 2,036 , Sept 2026) Style Strengths GitHub 29
date-fns 4.4 36,647 Pure functions on native Date Tree-shakable, immutable github.com/date-fns/date-fns
Day.js 1.11 48,666 Chainable wrapper 2 kB core, Moment-like API github.com/iamkun/dayjs
Luxon 3.7 16,461 Immutable DateTime objects Time zones and locales via Intl github.com/moment/luxon
The same tasks in date-fns, Day.js and Luxon (npm install date-fns dayjs luxon)JavaScript
import { addMonths, format } from 'date-fns';
import dayjs from 'dayjs';
import { DateTime } from 'luxon';
console.log(format(addMonths(new Date(2026, 0, 31), 1), 'yyyy-MM-dd'),
  dayjs('2026-01-31').add(1, 'month').format('D MMM YYYY'));
const ny = DateTime.fromISO('2026-03-07T09:00', { zone: 'America/New_York' }).plus({ days: 1 });
console.log(ny.toISO(), ny.setZone('Asia/Kuala_Lumpur').toFormat('ccc HH:mm'));
Output
2026-02-28 28 Feb 2026
2026-03-08T09:00:00.000-04:00 Sun 21:00

Choose date-fns for small bundles, Day.js when migrating from Moment, and Luxon for time-zone-heavy apps.