Crate salah

Crate salah 

Source
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          = NaiveDate::from_ymd_opt(2019, 1, 25).expect("Invalid date provided");
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 (use salah::prelude::*;).

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.
DateTime
ISO 8601 combined date and time with time zone.
Local
The local timescale.
NaiveDate
ISO 8601 calendar date without timezone. Allows for every proleptic Gregorian date from Jan 1, 262145 BCE to Dec 31, 262143 CE. Also supports the conversion from ISO 8601 ordinal and week date.
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.

Type Aliases§

Duration
Alias of TimeDelta.