[−][src]Crate salah
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
prelude | A convenience module appropriate for glob imports ( |
Structs
Adjustment | Builder struct for the TimeAdjustment. It is recommended to use this for all needed adjustments. |
Configuration | A builder for the the Parameters. |
Coordinates | The latitude and longitude associated with a location. Both latiude and longitude values are specified in degrees. |
Date | ISO 8601 calendar date with time zone. |
DateTime | ISO 8601 combined date and time with time zone. |
Duration | ISO 8601 time duration with nanosecond precision. This also allows for the negative duration; see individual methods for details. |
Local | The local timescale. This is implemented via the standard |
Parameters | Settings that are used for determining the the correct prayer time. |
PrayerSchedule | A builder for the PrayerTimes struct. |
PrayerTimes | A data struct to hold the timing for all prayers. |
TimeAdjustment | Time adjustment for all prayer times. The value is specified in minutes and can be either positive or negative. |
Utc | 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
Madhab | Setting for the Asr prayer time. For Hanafi madhab, the Asr is bit later than that of the Shafi madhab. |
Method | Provides preset configuration for a few authorities for calculating prayer times. |
Prayer | Names of all obligatory prayers, sunrise, and Qiyam. |
Traits
Datelike | The common set of methods for date component. |
Stride | Convenience methods for the DateTime type. |
TimeZone | The time zone. |
Timelike | The common set of methods for time component. |