v7.0.0
Major release focused on a cleaner immutable API, closer PHP IntlDateFormatter and IntlCalendar compatibility, and reliable timezone behavior across historical and daylight-saving transitions.
Breaking Changes
- Renamed immutable
set*()copy methods towith*(), includingsetDate()→withDate(),setTimeZone()→withTimeZone(), and related calendar and time setters. - Renamed
isDST()toisDst(). - Consolidated the implementation behind the root
@fr0st/datetimeexport; deep imports of internalsrc/modules are no longer supported. - Updated supported Node.js versions to
^20.19.0,^22.13.0, or>=24.
Fixed
- Preserved the instant represented by explicit
Zand numeric offsets while treating unzoned ISO dates and date-times as local wall time in the requested timezone. - Corrected timezone offsets for years
0through99, BC dates, and historical second-precision offsets. - Corrected time-only parsing to use January 1, 1970 in the requested local timezone.
- Made week numbers and relative day and week differences calendar-aware across daylight-saving transitions.
- Resolved skipped wall times, repeated hours, and fully deleted calendar days consistently with PHP behavior.
- Forced Gregorian locale formatting and preserved locale region and Unicode
rgoverrides for week rules. - Fixed ICU apostrophe escaping, compact fixed-width numeric parsing, and parsing with non-BMP numbering systems.
Improved
- Added second-precision fixed-offset parsing and formatting for the corresponding
X,x, andZtoken widths. - Audited token widths against PHP ICU behavior, added explicit unsupported-token errors, and documented the compatibility matrix.
- Added
toJSON()output andDateTime.clearDataCache()for formatter and locale caches. - Reworked the internal
DateTimeimplementation and refreshed the README, format reference, JSDoc, tests, and generated bundles.
Tooling
- Added CI across Node.js 20, 22, and 24 with lint, test, build, generated-bundle, and npm-package validation.
- Added trusted npm publishing with provenance from GitHub releases.
- Added focused-test prevention, complete source-map links, and an npm release-age policy.
- Updated ESLint, Mocha, Rollup, Terser, and the shared Frost ESLint configuration.