A Node.js package that formats JavaScript dates using Steven Levithan’s dateFormat() function, with options for predefined named masks or custom masks. It’s useful when you need consistent date and time string formatting, including support for UTC/GMT formatting and ISO 8601-related values like week number (W) and day-of-week number (N).
Project status
- The source is currently active: it was pushed on October 24, 2026, with updates on October 11 and October 24.
- Cadence is irregular. After a long quiet period from 2022 to 2026, updates have recently resumed in a short burst.
AI summary generated
Recent updates
v5.0.5
Version 5.0.5 fixes UTC-mode relative day names so `DDD` and `DDDD` use UTC calendar-day boundaries when determining yesterday, today, and tomorrow. The release also adds regression tests and changes the npm publish lifecycle to run the test suite before publishing.
v5.0.4
Release v5.0.4 fixes two formatting issues: the `yy` token now produces correct last two digits for years outside 1000 to 9999 (and for negative years), and the ISO week/weekday tokens now respect UTC/GMT mode. The code changes primarily affect `src/dateformat.js`, with corresponding test updates.
v5.0.3
Release v5.0.3 updates the package metadata to address a Node ES module deprecation warning related to how the package.json main field is resolved. The change ensures the main entry includes an explicit .js extension.
v5.0.2
Release v5.0.2 contains only a documentation update. The release notes mention updating docs for dateformat imports, and the code diff shows the README examples were changed to use different import and mutation patterns.
v5.0.1
Release v5.0.1 is described as focusing on bundle size reductions, a fix for an Australia-specific `Z` format issue, and a breaking change to how the library is imported. The provided code diff, however, shows only package metadata and a heavily modified lockfile, with no actual source diff included.
Breakingv4.6.2
Release v4.6.2 addresses an import-related breakage reported as a breaking change. This update focuses on restoring compatibility for how modules are imported by developers.
v4.6.1
Release v4.6.1 focuses on reducing bundle size and fixing the `Z` mask formatting for Australia time zones. The release notes are brief and do not mention any module system or API surface changes.
v4.5.1
Release v4.5.1 is described as a small bug fix release. The release notes claim it fixes the `WW` mask not working, but the provided code diff shows only version metadata updates.
v4.5.0
Release v4.5.0 adds support for a new date format mask token, `WW`, to output the ISO week number with leading zero padding. The implementation extends the token parser and formatter mapping to recognize and render `WW`, and it adds corresponding test coverage.
Featuresv4.4.2
Release 4.4.2 updates the handling of the DDD and DDDD masks. The documented change fixes cases where those masks sometimes failed to produce the expected output for “Today”, “Yesterday”, and “Tomorrow” labels.
v4.4.1
Release v4.4.1 updates the `DDD` formatting token, which represents short labels for Yesterday, Today, and Tomorrow. The short outputs are changed to `Ysd`, `Tdy`, and `Tmw`, and the README and tests are updated accordingly.
Breakingv4.4.0
Release 4.4.0 introduces two new date format mask tokens, DDD and DDDD, intended to render special strings for yesterday, today, and tomorrow (otherwise falling back to the normal weekday abbreviations/names). The code change adds new parsing support for these tokens and includes corresponding README and test updates.
Features