Skip to content

Releases: frost-js/datetime

v8.1.3

Choose a tag to compare

@elusivecodes elusivecodes released this 06 Sep 03:58

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

Choose a tag to compare

@elusivecodes elusivecodes released this 29 Aug 07:06

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-config to 5.0.3 and refreshed the lockfile.

v8.1.1

Choose a tag to compare

@elusivecodes elusivecodes released this 28 Aug 23:45

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/* and src/* subpath exports.
  • Updated the classic browser example to use globalThis.DateTime.
  • Updated @fr0st/eslint-config to 5.0.2 and refreshed the lockfile.

v8.1.0

Choose a tag to compare

@elusivecodes elusivecodes released this 28 Aug 13:57

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/* and src/* subpath exports.
  • Browser documentation now includes an ESM example while classic scripts continue to use globalThis.DateTime unchanged.

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

Choose a tag to compare

@elusivecodes elusivecodes released this 27 Aug 07:29

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, and minify, with matching updates to CI, publishing, and development documentation.
  • Updated @fr0st/eslint-config from version 4 to 5 and adjusted rest-parameter and type-import JSDoc for the expanded rules.
  • Refreshed the generated bundles and package-lock.json for the tooling changes.

v8.0.2

Choose a tag to compare

@elusivecodes elusivecodes released this 22 Aug 00:00

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

Choose a tag to compare

@elusivecodes elusivecodes released this 21 Aug 06:38

Patch release aligning JSDoc with the conventions used across current Frost projects.

Improved

  • Standardized return documentation on @returns throughout the codebase.
  • Quoted string defaults and normalized @throws wording and tag order.
  • Regenerated distribution bundles with the updated documentation.

v8.0.0

Choose a tag to compare

@elusivecodes elusivecodes released this 19 Aug 09:43

Major release correcting the public ISO-output method name and simplifying the format documentation.

Breaking Changes

  • Renamed toISOString() to toIsoString(). Update direct calls to use the new method. fromISOString() and toJSON() retain their existing names.

Improved

  • Updated toJSON() to serialize valid dates through toIsoString() 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

Choose a tag to compare

@elusivecodes elusivecodes released this 16 Aug 01:57

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 to with*(), including setDate() → withDate(), setTimeZone() → withTimeZone(), and related calendar and time setters.
  • Renamed isDST() to isDst().
  • Consolidated the implementation behind the root @fr0st/datetime export; deep imports of internal src/ 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 Z and numeric offsets while treating unzoned ISO dates and date-times as local wall time in the requested timezone.
  • Corrected timezone offsets for years 0 through 99, 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 rg overrides 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, and Z token widths.
  • Audited token widths against PHP ICU behavior, added explicit unsupported-token errors, and documented the compatibility matrix.
  • Added toJSON() output and DateTime.clearDataCache() for formatter and locale caches.
  • Reworked the internal DateTime implementation 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.

v6.1.1

Choose a tag to compare

@elusivecodes elusivecodes released this 09 May 05:47
  • Updated NPM.