islamic_utility 1.4.1
islamic_utility: ^1.4.1 copied to clipboard
Prayer times, sunnah times, and qibla direction utilities with a Meeus-based astronomical engine.
1.4.1 #
- Fixed anchor cache key strategy: switched from per-day to per Gregorian
year-month (
YYYY-MM), since anchor records represent month-boundary data valid for the entire month. The old per-day key caused a cache miss on every new day even when the anchor for that month had already been fetched. - Fixed
fetchLatestAnchorsresult not being saved toanchorCachein_resolveFromAnchor: subsequent single-date queries for other days in the same month now hit the cache instead of triggering a double HTTP call cycle. - Fixed stale ETag passed to
fetchLatestAnchorsin_resolveFromAnchor: now usesremote.etag(fromfetchAnchorsByDate) instead of the outdatedcachedAnchor?.etag, enabling correct304 Not Modifiedhandling. - Fixed
fetchAnchorsByDateresponse with empty records being stored in cache: empty records are no longer cached, preventing a stale cache entry that would block thefetchLatestAnchorsfallback from persisting its result. - Fixed cache key UTC normalization across all four cache implementations
(
InMemoryHijriAdjustmentCache,HiveHijriAdjustmentCache,InMemoryHijriAnchorCache,HiveHijriAnchorCache): keys are now derived fromdate.toUtc()to prevent cache misses for WIB (UTC+7) callers who pass a localDateTimenear midnight. - Fixed
_prefetchRangealways re-fetching regardless of cache state: added_anyDayMissingAnchorand_anyDayMissingAdjustmentguards so the method skips HTTP calls entirely when all days in the requested range are already covered by a fresh cache entry. Also threads ETag through the range fetch for proper 304 conditional-request support.
1.4.0 #
- Improved official Hijri range resolution consistency:
- range prefetch now falls back to
fetchLatestAnchors(...)once whenfetchAnchorsRange(...)returns empty records near boundary windows - prevents unexpected local fallback mismatch for range mode
- range prefetch now falls back to
- Kept range flow optimized (no per-day remote loop) while preserving anchor-based official result parity.
- Added/updated tests to lock boundary behavior:
- range empty-anchor + latest-anchor fallback case
- batch-only official range assertions remain enforced
- Added transition-ready unified calendar facade usage updates and examples alignment with official mode expectations.
- Cleaned examples and docs for release safety:
- replaced hardcoded API keys with placeholders
- synchronized README/API docs with current public surface.
1.3.0 #
- Added official Hijri range conversion API:
HijriCalendar.fromGregorianOfficialRange({from, to})
- Added range fetch contracts in
HijriAdjustmentClient:fetchRange(...)fetchAnchorsRange(...)
- Added HTTP range fetch implementation in
HttpHijriAdjustmentClient:- adjustments range endpoint
- anchors range endpoint
- Optimized official range flow to avoid per-day remote fetch loops after range prefetch.
- Added persistent cache implementations using Hive:
HiveHijriAdjustmentCacheHiveHijriAnchorCache
- Added support for injecting
anchorCacheinHijriCalendar.withOfficial(...). - Added Javanese calendar module:
JavaneseCalendarPasaran(Legi,Pahing,Pon,Wage,Kliwon)JavaneseDate(pasaran,weton)
- Added transition-friendly unified facade:
UnifiedCalendarCalendarResolveOptionsUnifiedCalendarDate
- Added examples:
example/hijri_official_range_hive_example.dartexample/hijri_official_range_hive_flutter_example.dartexample/javanese_pasaran_example.dartexample/unified_calendar_example.dart
- Expanded and synchronized documentation:
README.mddoc/01-public-api-spec.mddoc/11-api-reference.mddoc/13-hijri-integration-guide.md
- Added and updated tests for:
- HTTP range request behavior
- official provider range prefetch behavior
- no per-day anchor remote calls in range mode
1.2.0 #
- Added Hijri calendar foundation module (
calendar_hijri) with modular structure. - Added
HijriCalendarpublic facade API. - Added
HijriMethodoptions:calculatedLocalummAlQurakemenagRiOfficial(via official adjustment flow)
- Added Umm al-Qura provider implementation and dataset organization.
- Added local civil Hijri provider implementation.
- Added mock-first official adjustment flow:
- adjustment client contract
- in-memory cache contract
- fallback chain: remote -> cache -> local
- Added Hijri examples:
example/hijri_methods_example.dartexample/hijri_official_mock_example.dart
- Added Hijri docs:
doc/13-hijri-integration-guide.md- FAQ updates in
doc/12-faq-troubleshooting.md
1.1.0 #
- Refactored astronomical engine to a Meeus-based pipeline with higher precision and 3-day interpolation.
- Added
imsakanddhuhaprayer outputs. - Added configurable
dhuhaOffsetMinutesinCalculationParameters. - Expanded runnable examples, including Bangsri Jepara coordinates.
- Added bilingual documentation:
- Updated
README.md(Indonesia + English) - Added
docs/11-api-reference.md(bilingual API reference) - Added
docs/12-faq-troubleshooting.md(bilingual FAQ/troubleshooting)
- Updated
1.0.0 #
- Initial version.