pub enum BadiMonth {
Month(u8),
AyyamIHa,
}Expand description
Represents one of the 19 Bahá’í months or Ayyám-i-Há
Variants§
Month(u8)
One of the 19 Badi/Bahá’í months (parameter is 1-based month number)
AyyamIHa
The intercalary days of Ayyám-i-Há
Implementations§
source§impl BadiMonth
impl BadiMonth
sourcepub fn validate(&self) -> Result<Self, BadiDateError>
pub fn validate(&self) -> Result<Self, BadiDateError>
Return self if month is valid, otherwise BadiDateError::MonthInvalid
sourcepub fn number_of_days(&self, year: u8) -> u16
pub fn number_of_days(&self, year: u8) -> u16
Max number of days in the month (year required to compute Ayyám-i-Há days)
sourcepub fn transliteration(&self) -> String
pub fn transliteration(&self) -> String
English transliteration of Arabic name of the month
sourcepub fn additional_meanings(&self) -> String
pub fn additional_meanings(&self) -> String
Additional meanings in authorized English translations of Baháʼí scripture https://en.wikipedia.org/wiki/Bah%C3%A1%CA%BC%C3%AD_calendar
sourcepub fn name(&self, locale: &str) -> String
pub fn name(&self, locale: &str) -> String
Get name of the month in a locale (see /locales/app.yaml): en: English ar: Arabic tl: English transliteration extra: Additional meanings (English)
sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Get a (debug) description of the month
Trait Implementations§
source§impl PartialEq for BadiMonth
impl PartialEq for BadiMonth
impl Copy for BadiMonth
impl StructuralPartialEq for BadiMonth
Auto Trait Implementations§
impl Freeze for BadiMonth
impl RefUnwindSafe for BadiMonth
impl Send for BadiMonth
impl Sync for BadiMonth
impl Unpin for BadiMonth
impl UnwindSafe for BadiMonth
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