mirror of
https://github.com/acamarata/pray-calc-dart.git
synced 2026-06-30 19:04:25 +00:00
getTimes now constructs civDate = DateTime.utc(date.year, date.month, date.day, 12, 0, 0) at entry and passes it to both getSpa and getAngles. Previously a local DateTime in a positive-UTC-offset zone (e.g. UTC+12) would reach getSpa.toUtc() as the previous UTC calendar day, shifting all prayer times by ~24 h. Regression tests added for UTC/local DateTime consistency across UTC, EDT, and Auckland host timezones (27 tests, all pass).
1.3 KiB
1.3 KiB
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.
[Unreleased]
Fixed
- Prayer times are now host-timezone-independent.
getTimesnormalizes the caller'sdateto a stable UTC-noon reference (DateTime.utc(y, m, d, 12)) before passing it togetSpaand all astronomical calculations. Previously, a localDateTime(2024, 3, 15)in a UTC+12 zone would reachgetSpaas UTC March 14, shifting all times by one civil day.
[1.0.0] - 2026-05-25
Added
- Initial public release.
getTimes— calculates Fajr, Dhuhr, Asr, Maghrib, Isha, midnight, and Qiyam times for any date and location.- MCW seasonal model for Fajr and Isha twilight angles.
- Dynamic Prayer Calculation (DPC) algorithm with ML-calibrated depression angles.
PrayerConfig— configurable madhab (Hanafi/standard Asr), calculation method, and UTC offset.- Pure Dart implementation. Zero runtime dependencies beyond
nrel_spa. - Depends on
nrel_spa ^1.0.0for NREL Solar Position Algorithm. - Dart SDK
^3.7.0compatibility. - 24 unit tests covering all 7 prayer outputs across known locations and dates.