Expand description
An Islamic prayer time implementation based on the Adhan library by Batoul Apps. While it has a lot of commnalities with the interface has been changed slightly to make it more ergonomic and intuitive.
Example
use salah::prelude::*;
let new_york_city = Coordinates::new(40.7128, -74.0059);
let date = Utc.ymd(2019, 1, 25);
let params = Configuration::with(Method::NorthAmerica, Madhab::Hanafi);
let prayers = PrayerSchedule::new()
.on(date)
.for_location(new_york_city)
.with_configuration(params)
.calculate();Modules
A convenience module appropriate for glob imports (
use salah::prelude::*;).Structs
Builder struct for the TimeAdjustment.
It is recommended to use this for all needed adjustments.
A builder for the the Parameters.
The latitude and longitude associated with a location.
Both latiude and longitude values are specified in degrees.
ISO 8601 calendar date with time zone.
ISO 8601 combined date and time with time zone.
ISO 8601 time duration with nanosecond precision.
This also allows for the negative duration; see individual methods for details.
The local timescale. This is implemented via the standard
time crate.Settings that are used for determining the
the correct prayer time.
A builder for the PrayerTimes struct.
A data struct to hold the timing for all
prayers.
Time adjustment for all prayer times.
The value is specified in minutes and
can be either positive or negative.
The UTC time zone. This is the most efficient time zone when you don’t need the local time.
It is also used as an offset (which is also a dummy type).
Enums
Setting for the Asr prayer time.
For Hanafi madhab, the Asr is bit later
than that of the Shafi madhab.
Provides preset configuration for a few authorities
for calculating prayer times.
Names of all obligatory prayers,
sunrise, and Qiyam.