hijri_core 1.0.1
hijri_core: ^1.0.1 copied to clipboard
Hijri/Gregorian calendar conversion for Dart and Flutter. Pluggable engine system with built-in Umm al-Qura and FCNA calendars. Zero dependencies.
Changelog #
All notable changes to this project will be documented in this file.
The format follows Keep a Changelog. This project adheres to Semantic Versioning.
1.0.1 #
Fixed #
toHijrinow normalizes the inputDateTimeto its UTC calendar day before lookup (viadate.toUtc()), matching the UTC-midnight contract oftoGregorian. Previously, passing a localDateTimeon a host west of UTC could return the previous Hijri day, breakingtoHijri(toGregorian(y, m, d))round-trips. Applies to both the UAQ and FCNA engines.
1.0.0 - 2026-05-25 #
Added #
- Initial public release.
toHijri— converts a GregorianDateTimeto a Hijri date tuple.fromHijri— converts a Hijri date tuple to a GregorianDateTime.daysInMonth— returns the number of days in a given Hijri month for a given engine.isValid— validates a Hijri date for a given engine.listCalendars/getCalendar— registry API for available calendar engines.- Built-in Umm al-Qura (UAQ) engine with tabular data.
- Built-in FCNA (Fiqh Council of North America) calculated engine.
- Pluggable
CalendarEngineabstract class for custom Hijri calendar implementations. - Pure Dart implementation. Zero runtime dependencies.
- Dart SDK
^3.7.0compatibility. - 42 unit tests covering all 8 SPORT features across both UAQ and FCNA engines.