Enum badi_date::BahaiHolyDay
source · pub enum BahaiHolyDay {
NawRuz,
Ridvan1st,
Ridvan9th,
Ridvan12th,
DeclarationOfTheBab,
AscensionOfBahaullah,
MartyrdomOfTheBab,
BirthOfTheBab,
BirthOfBahaullah,
DayOfTheCovenant,
AscensionOfAbdulBaha,
}Expand description
List of the 11 Bahá’í Holy Days (9 on which work is to be suspended) See https://www.bahai.org/action/devotional-life/calendar
Variants§
NawRuz
Naw-Rúz
Ridvan1st
1st day of Riḍván
Ridvan9th
9th day of Riḍván
Ridvan12th
12th day of Riḍván
DeclarationOfTheBab
Declaration of the Báb
AscensionOfBahaullah
Ascension of Bahá’u’lláh
MartyrdomOfTheBab
Martyrdom of the Báb
BirthOfTheBab
Birth of the Báb
BirthOfBahaullah
Birth of Bahá’u’lláh
DayOfTheCovenant
Day of the Covenant (work not suspended)
AscensionOfAbdulBaha
Ascension of ‘Abdu’l-Bahá (work not suspended)
Implementations§
source§impl BahaiHolyDay
impl BahaiHolyDay
sourcepub fn name(&self, locale: &str) -> String
pub fn name(&self, locale: &str) -> String
Name of the holy day in the given locale
TODO: Currently only “en” is available
sourcepub fn day_of_year(&self, year: u8) -> u16
pub fn day_of_year(&self, year: u8) -> u16
Get the 1-based Badi day of the Badi year on which the holy day occurs in the given Badi year
sourcepub fn work_suspended(&self) -> bool
pub fn work_suspended(&self) -> bool
Whether work is to be suspended on this holy day
Trait Implementations§
source§impl Clone for BahaiHolyDay
impl Clone for BahaiHolyDay
source§fn clone(&self) -> BahaiHolyDay
fn clone(&self) -> BahaiHolyDay
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for BahaiHolyDay
impl Debug for BahaiHolyDay
source§impl Hash for BahaiHolyDay
impl Hash for BahaiHolyDay
source§impl Ord for BahaiHolyDay
impl Ord for BahaiHolyDay
source§fn cmp(&self, other: &BahaiHolyDay) -> Ordering
fn cmp(&self, other: &BahaiHolyDay) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for BahaiHolyDay
impl PartialEq for BahaiHolyDay
source§fn eq(&self, other: &BahaiHolyDay) -> bool
fn eq(&self, other: &BahaiHolyDay) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for BahaiHolyDay
impl PartialOrd for BahaiHolyDay
source§fn partial_cmp(&self, other: &BahaiHolyDay) -> Option<Ordering>
fn partial_cmp(&self, other: &BahaiHolyDay) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Copy for BahaiHolyDay
impl Eq for BahaiHolyDay
impl StructuralPartialEq for BahaiHolyDay
Auto Trait Implementations§
impl Freeze for BahaiHolyDay
impl RefUnwindSafe for BahaiHolyDay
impl Send for BahaiHolyDay
impl Sync for BahaiHolyDay
impl Unpin for BahaiHolyDay
impl UnwindSafe for BahaiHolyDay
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.