Enum Era
pub enum Era
The era corresponding to a particular year.
The BCE era corresponds to years less than or equal to 0, while the CE
era corresponds to years greater than 0.
In particular, this crate allows years to be negative and also to be 0,
which is contrary to the common practice of excluding the year 0 when
writing dates for the Gregorian calendar. Moreover, common practice eschews
negative years in favor of labeling a year with an era notation. That is,
the year 1 BCE is year 0 in this crate. The year 2 BCE is the year
-1 in this crate.
To get the year in its era format, use Date::era_year.
Variants
-
BCE The "before common era" era.
This corresponds to all years less than or equal to
0.This is precisely equivalent to the "BC" or "before Christ" era.
-
CE The "common era" era.
This corresponds to all years greater than
0.This is precisely equivalent to the "AD" or "anno Domini" or "in the year of the Lord" era.
Trait Implementations
impl Clone for Era
fn clone(&self) -> Self
impl Copy for Era
impl Debug for Era
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for Era
impl Hash for Era
fn hash<__H: Hasher>(&self, state: &mut __H)
impl PartialEq for Era
fn eq(&self, other: &Self) -> bool