pub struct HijriYearData {
packed: PackedHijriYearData,
extended_year: i32,
}Expand description
Information about a Hijri year.
Fields§
§packed: PackedHijriYearData§extended_year: i32Implementations§
Source§impl HijriYearData
impl HijriYearData
Sourcepub fn try_new(
extended_year: i32,
start_day: RataDie,
month_lengths: [bool; 12],
) -> Option<Self>
pub fn try_new( extended_year: i32, start_day: RataDie, month_lengths: [bool; 12], ) -> Option<Self>
Creates HijriYearData from the given parts.
start_day is the date for the first day of the year, see Date::to_rata_die
to obtain a RataDie from a Date in an arbitrary calendar. start_day has
to be within 5 days of the start of the year of the TabularAlgorithm.
month_lengths[n - 1] is true if the nth month has 30 days, and false otherwise.
Either 6 or 7 months need to have 30 days.
fn lookup( extended_year: i32, starting_year: i32, data: &[PackedHijriYearData], ) -> Option<Self>
fn new_year(self) -> RataDie
Trait Implementations§
Source§impl Clone for HijriYearData
impl Clone for HijriYearData
Source§fn clone(&self) -> HijriYearData
fn clone(&self) -> HijriYearData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 HijriYearData
impl Debug for HijriYearData
Source§impl Hash for HijriYearData
impl Hash for HijriYearData
Source§impl Ord for HijriYearData
impl Ord for HijriYearData
Source§fn cmp(&self, other: &HijriYearData) -> Ordering
fn cmp(&self, other: &HijriYearData) -> Ordering
1.21.0 (const: unstable) · 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 HijriYearData
impl PartialEq for HijriYearData
Source§fn eq(&self, other: &HijriYearData) -> bool
fn eq(&self, other: &HijriYearData) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for HijriYearData
impl PartialOrd for HijriYearData
Source§impl ToExtendedYear for HijriYearData
impl ToExtendedYear for HijriYearData
fn to_extended_year(&self) -> i32
impl Copy for HijriYearData
impl Eq for HijriYearData
impl StructuralPartialEq for HijriYearData
Auto Trait Implementations§
impl Freeze for HijriYearData
impl RefUnwindSafe for HijriYearData
impl Send for HijriYearData
impl Sync for HijriYearData
impl Unpin for HijriYearData
impl UnsafeUnpin for HijriYearData
impl UnwindSafe for HijriYearData
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