Skip to main content

Prayer Times Calculator - Offline

Project description

Prayer Times Calculator - Offline

Not designed as a general purpose prayer time library. This is meant as a cloud-free, drop-in replacement for prayer-times-calculator, which in turn is used by the Islamic Prayer Times HomeAssistant integration.

Equivalence to the prayer-times-calculator library was checked by emperical comparison of 50,000 requests (each with randomized parameters). The original intention was to replicate the output exactly, however please note the following exceptions where prayer-times-calculator-offline will return a different result than prayer-times-calculator for the same call:

  • Asr calculation is stable; at time of writing, AlAdhan's API uses the API server's local time as part of the Asr calculation, causing the returned time to drift as the server's day progresses.
  • ISO8601 date components are correct; at time of writing, AlAdhan's API sometime returns ISO8601 timestamps with correct times but incorrect dates.
    • E.g. this API call where all timestamps are returned with the same date component, making Isha appear to happen before Maghrib and Fajr appear to happen after Sunrise
  • Portugal Maghrib tuning applied correctly; At time of writing, AlAdhan's API maps the Asr tuning value to Maghrib
  • Local time output (iso8601=False) is not supported, as it is not required for use in HomeAssistant (which deals only with UTC internally)
  • 'None' is supported as a high-latitude adjustment method
  • Angles of 0 are supported for the "custom" calculation method; at time of writing, AlAdhan's API silently ignores such angles and uses a different default angle in their place.
  • Floating point computations take place on your CPU, which may vary from the AlAdhan API server's CPU; there may be 1-minute differences if these computational variations span a rounding break. Hijri date calculation may also be affected, including the 30-minute Isha offset during Ramadan when using the Makkah calculation method.

The remainder of this README is based on that from prayer-times-calculator.

Usage

Please refer to the usage section of prayer-times-calculator.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prayer_times_calculator_offline-1.0.1.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file prayer_times_calculator_offline-1.0.1.tar.gz.

File metadata

File hashes

Hashes for prayer_times_calculator_offline-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4432060f21c719336aaba0a24183d0fb9080031ba0214c76472e28f1eb863bde
MD5 26f3411ad69e9cb4f1d8a013762514e8
BLAKE2b-256 f9b786f3a2fb085d632150a7f8dc43abb6be90e96a6c585d63e3f063895ef691

See more details on using hashes here.

File details

Details for the file prayer_times_calculator_offline-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for prayer_times_calculator_offline-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f148f78b33395efdee799e96058fddb3043a5fb10d9d5885bb77f2104195777e
MD5 0bae248b8bf0eed9938a58199a449484
BLAKE2b-256 52adc37e2c20d98d3732a8f152e2c1ce4a257e5cbc56709076d9c74d3b147cdc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page