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§

  • 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 combined date and time with time zone.
  • The local timescale.
  • 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.
  • 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.

Traits§

  • The common set of methods for date component.
  • Convenience methods for the DateTime type.
  • The time zone.
  • The common set of methods for time component.

Type Aliases§