Releases: frost-js/datetime
Release list
v8.1.3
This release corrects date parsing, era numbering, and calendar calculations, and simplifies the test suite while preserving coverage.
Fixed
- Preserve the instant when parsing zoned strings with fractional seconds or spaced RFC offsets.
- Preserve invalid dates when copying instances or applying locale and time-zone options during ISO parsing.
- Apply ICU's moving 100-year window to two-digit calendar and week years.
- Consistently select the later occurrence of repeated local times during DST transitions.
- Correct month-week calculations near year boundaries and parsing that combines day-of-month, month-week, or weekday-occurrence fields.
- Correct BC year numbering while preserving astronomical years and signed extended years in ISO parsing and output.
- Parse the fixed-offset output of time-zone tokens, fully anchor token alternatives, and correctly match Unicode literals, including emoji.
- Preserve the operation direction when subtracting weeks across deleted calendar dates.
Changed
- Simplified date construction, parse ordering, and difference calculations.
- Updated the README to reflect current behavior and align installation instructions with the other Frost packages.
- Replaced repetitive tests with named data tables and independently reported cases. All 1,656 tests pass with unchanged coverage.
v8.1.2
This maintenance release updates Frost DateTime branding and repository metadata following the move to frost-js/datetime, while refreshing shared lint tooling. There are no runtime or API changes.
Changed
- Updated the project name in the documentation from FrostDateTime to Frost DateTime.
- Updated package metadata, README badges, and repository links for
frost-js/datetime. - Updated
@fr0st/eslint-configto 5.0.3 and refreshed the lockfile.
v8.1.1
This maintenance release clarifies FrostDateTime package entry points and browser usage while refreshing shared lint tooling. There are no runtime or API changes.
Changed
- Clarified that the package root is ESM-only and documented the published
dist/*andsrc/*subpath exports. - Updated the classic browser example to use
globalThis.DateTime. - Updated
@fr0st/eslint-configto 5.0.2 and refreshed the lockfile.
v8.1.0
This release moves FrostDateTime to Vite and Vitest and adds prebuilt ESM bundles alongside the existing UMD builds. The public DateTime API is unchanged.
Improved
- Readable and minified ESM bundles now ship with source maps for direct browser and CDN use.
- The package root now resolves to the prebuilt ESM bundle, with matching
dist/*andsrc/*subpath exports. - Browser documentation now includes an ESM example while classic scripts continue to use
globalThis.DateTimeunchanged.
Tooling
- Replaced Rollup, Terser, and Mocha with Vite and Vitest.
- Added V8 coverage reporting, Codecov configuration, and coverage uploads from the Node.js 24 CI job.
- Updated the shared Frost ESLint configuration and regenerated every distribution bundle and source map.
v8.0.3
This maintenance release cleans up FrostDateTime's development commands and adopts the latest shared lint rules. There are no runtime or API changes.
Changed
- Normalized the npm scripts to
bundle,lint, andminify, with matching updates to CI, publishing, and development documentation. - Updated
@fr0st/eslint-configfrom version 4 to 5 and adjusted rest-parameter and type-import JSDoc for the expanded rules. - Refreshed the generated bundles and
package-lock.jsonfor the tooling changes.
v8.0.2
Patch release strengthening DateTime encapsulation with native JavaScript private fields.
Improved
- Replaced underscore-prefixed internal state with native private class fields.
- Preserved the documented public API and existing DateTime behavior.
- Regenerated distribution bundles with the updated implementation.
v8.0.1
Patch release aligning JSDoc with the conventions used across current Frost projects.
Improved
- Standardized return documentation on
@returnsthroughout the codebase. - Quoted string defaults and normalized
@throwswording and tag order. - Regenerated distribution bundles with the updated documentation.
v8.0.0
Major release correcting the public ISO-output method name and simplifying the format documentation.
Breaking Changes
- Renamed
toISOString()totoIsoString(). Update direct calls to use the new method.fromISOString()andtoJSON()retain their existing names.
Improved
- Updated
toJSON()to serialize valid dates throughtoIsoString()while preserving its standard JSON behavior. - Removed PHP-specific comparisons from the documentation and made the primary token table the single format reference.
- Updated README examples, tests, and generated distribution bundles for the renamed method.
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.