Commit graph

3 commits

Author SHA1 Message Date
Aric Camarata
a2f947b011 style: apply dart format 2026-06-13 11:57:56 -04:00
Aric Camarata
c79368a4ee fix: interpret DateTime by UTC calendar day for exact round-trips
toHijri in both UAQ and FCNA engines read .year/.month/.day from the
input DateTime — local calendar components — then passed them to
DateTime.utc(). On hosts west of UTC a UTC-midnight local DateTime
resolves to the previous local day, causing toHijri(toGregorian(y,m,d))
to return the wrong Hijri day.

Fix: call date.toUtc() first in both engines before extracting calendar
components. This is symmetric with toGregorian which always returns
DateTime.utc(). Adds 3 regression tests covering the round-trip and the
local-DateTime-on-UTC-west-host case.
2026-06-13 10:28:16 -04:00
Aric Camarata
ba0061ae60 Initial release: hijri_core v1.0.0 2026-03-08 13:03:11 -04:00