temporal-hijri/CHANGELOG.md
Aric Camarata 4dd246f27a fix: build Dates via Date.UTC for hijri-core's UTC-day contract
HijriCalendar.toHijri() previously used new Date(y, m, d) (local-time
constructor). Under hijri-core's new UTC-day contract the engine reads
the UTC calendar day, so on east-of-UTC hosts (e.g. UTC+5) the local
midnight falls on the previous UTC date, producing a one-day-off Hijri
result.

Fix: use Date.UTC(y, m, d) so PlainDate calendar fields land in the
Date's UTC components, matching what hijri-core reads.

Lock-step dependency: this fix requires the unreleased hijri-core change
on fix/utc-day-boundary (commit 3419378). Both packages will be released
together per ADR-013.

Tests: round-trip regression added (2025-03-01 = 1 Ramadan 1446 AH);
all 37 ESM + 9 CJS tests pass at TZ=UTC, TZ=America/New_York,
TZ=Pacific/Auckland.
2026-06-10 16:35:38 -04:00

1.2 KiB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

Fixed

  • Date handed to hijri-core is now built via Date.UTC() to match hijri-core's UTC-day contract; fixes previous-day results on east-of-UTC hosts (e.g. UTC+5, UTC+8). Lock-step: requires the matching unreleased hijri-core fix (fix/utc-day-boundary).

[1.0.2] - 2026-05-30

Added

  • TSDoc comments on all public HijriCalendar methods

Changed

  • README condensed; quickstart trimmed to essential examples
  • CI: corepack before setup-node, prettier scoped to src/, d.mts emitted via postbuild
  • Adopt shared config packages (@acamarata/eslint-config, @acamarata/prettier-config, @acamarata/tsconfig)

[1.0.1] - 2026-05-28

Changed

  • Flatten exports map to ADR-015 standard (import/require/types at top level)
  • Add "./package.json" export condition
  • Add coverage script (c8 --reporter=lcov)
  • Migrate CI from pnpm/action-setup to corepack enable

[1.0.0] - 2026-05-28

Added

  • Initial release