pub struct TabularAlgorithm {
pub(crate) leap_years: TabularAlgorithmLeapYears,
pub(crate) epoch: TabularAlgorithmEpoch,
}Expand description
Hijri Rules for the Tabular Hijri Algorithm.
See TabularAlgorithmEpoch and TabularAlgorithmLeapYears for customization.
The most common version of these rules uses TabularAlgorithmEpoch::Friday and TabularAlgorithmLeapYears::TypeII.
When constructed with TabularAlgorithmLeapYears::TypeII, and either TabularAlgorithmEpoch::Friday or TabularAlgorithmEpoch::Thursday,
this corresponds to the "islamic-civil" and "islamic-tbla" CLDR calendars respectively.
Fields§
§leap_years: TabularAlgorithmLeapYears§epoch: TabularAlgorithmEpochImplementations§
Source§impl TabularAlgorithm
impl TabularAlgorithm
Sourcepub const fn new(
leap_years: TabularAlgorithmLeapYears,
epoch: TabularAlgorithmEpoch,
) -> Self
pub const fn new( leap_years: TabularAlgorithmLeapYears, epoch: TabularAlgorithmEpoch, ) -> Self
Construct a new TabularAlgorithm with the given leap year rule and epoch.
Trait Implementations§
Source§impl Clone for TabularAlgorithm
impl Clone for TabularAlgorithm
Source§fn clone(&self) -> TabularAlgorithm
fn clone(&self) -> TabularAlgorithm
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 TabularAlgorithm
impl Debug for TabularAlgorithm
Source§impl Hash for TabularAlgorithm
impl Hash for TabularAlgorithm
Source§impl Ord for TabularAlgorithm
impl Ord for TabularAlgorithm
Source§fn cmp(&self, other: &TabularAlgorithm) -> Ordering
fn cmp(&self, other: &TabularAlgorithm) -> 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 TabularAlgorithm
impl PartialEq for TabularAlgorithm
Source§fn eq(&self, other: &TabularAlgorithm) -> bool
fn eq(&self, other: &TabularAlgorithm) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for TabularAlgorithm
impl PartialOrd for TabularAlgorithm
Source§impl Rules for TabularAlgorithm
impl Rules for TabularAlgorithm
Source§fn calendar_algorithm(&self) -> Option<CalendarAlgorithm>
fn calendar_algorithm(&self) -> Option<CalendarAlgorithm>
The BCP-47
CalendarAlgorithm for the Hijri calendar using these rules, if defined.Source§fn ecma_reference_year(
&self,
month_code: (u8, bool),
day: u8,
) -> Result<i32, EcmaReferenceYearError>
fn ecma_reference_year( &self, month_code: (u8, bool), day: u8, ) -> Result<i32, EcmaReferenceYearError>
Returns an ECMA reference year that contains the given month-day combination. Read more
Source§fn debug_name(&self) -> &'static str
fn debug_name(&self) -> &'static str
The debug name for these rules.
Source§fn year_data(&self, extended_year: i32) -> HijriYearData
fn year_data(&self, extended_year: i32) -> HijriYearData
Returns data about the given year.
impl Copy for TabularAlgorithm
impl Eq for TabularAlgorithm
impl StructuralPartialEq for TabularAlgorithm
Auto Trait Implementations§
impl Freeze for TabularAlgorithm
impl RefUnwindSafe for TabularAlgorithm
impl Send for TabularAlgorithm
impl Sync for TabularAlgorithm
impl Unpin for TabularAlgorithm
impl UnsafeUnpin for TabularAlgorithm
impl UnwindSafe for TabularAlgorithm
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