npm / dateformat
dateformat
What changed in dateformat 3 to 5, from its official release notes, upgrade guides and advisories. Also covers @types/dateformat. Sources checked 2026-11-30.
1 new APIs and options5 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initdateformat 55 changes
Fixes and other changes 5
Fixed DDD and DDDD returning the wrong relative day names in UTC mode when the local date differs from the UTC date.
N now uses the UTC weekday when the mask uses UTC: or GMT:.
W now uses the UTC week when the mask uses UTC: or GMT:.
WW now uses the UTC week when the mask uses UTC: or GMT:.
Fixed yy returning incorrect digits for years outside 1000 to 9999, including negative years.
dateformat 31 changes
New APIs and options 1
AM/PM indicators can now be localized, requiring an extra field in dateFormat.i18n for anyone localizing the names.