Struct icu_calendar::cal::Ethiopian
source · pub struct Ethiopian(/* private fields */);
Expand description
The Ethiopian calendar is a solar calendar used by the Coptic Orthodox Church, with twelve normal months and a thirteenth small epagomenal month.
This type can be used with Date
or DateTime
to represent dates in this calendar.
It can be constructed in two modes: using the Amete Alem era scheme, or the Amete Mihret era scheme (the default),
see EthiopianEraStyle
for more info.
§Era codes
This calendar supports three era codes, based on what mode it is in. In the Amete Mihret scheme it has
the "incar"
and "pre-incar"
eras, 1 Incarnation is 9 CE. In the Amete Alem scheme, it instead has a single era,
"mundi
, where 1 Anno Mundi is 5493 BCE. Dates before that use negative year numbers.
§Month codes
This calendar supports 13 solar month codes ("M01" - "M13"
), with "M13"
being used for the short epagomenal month
at the end of the year.
Implementations§
source§impl Ethiopian
impl Ethiopian
sourcepub const fn new() -> Self
pub const fn new() -> Self
Construct a new Ethiopian Calendar for the Amete Mihret era naming scheme
sourcepub const fn new_with_era_style(era_style: EthiopianEraStyle) -> Self
pub const fn new_with_era_style(era_style: EthiopianEraStyle) -> Self
Construct a new Ethiopian Calendar with a value specifying whether or not it is Amete Alem
sourcepub fn set_era_style(&mut self, era_style: EthiopianEraStyle)
pub fn set_era_style(&mut self, era_style: EthiopianEraStyle)
Set whether or not this uses the Amete Alem era scheme
sourcepub fn era_style(&self) -> EthiopianEraStyle
pub fn era_style(&self) -> EthiopianEraStyle
Returns whether this has the Amete Alem era
Trait Implementations§
source§impl Calendar for Ethiopian
impl Calendar for Ethiopian
source§type DateInner = EthiopianDateInner
type DateInner = EthiopianDateInner
source§fn date_from_codes(
&self,
era: Option<Era>,
year: i32,
month_code: MonthCode,
day: u8,
) -> Result<Self::DateInner, DateError>
fn date_from_codes( &self, era: Option<Era>, year: i32, month_code: MonthCode, day: u8, ) -> Result<Self::DateInner, DateError>
source§fn date_from_iso(&self, iso: Date<Iso>) -> EthiopianDateInner
fn date_from_iso(&self, iso: Date<Iso>) -> EthiopianDateInner
source§fn months_in_year(&self, date: &Self::DateInner) -> u8
fn months_in_year(&self, date: &Self::DateInner) -> u8
source§fn days_in_year(&self, date: &Self::DateInner) -> u16
fn days_in_year(&self, date: &Self::DateInner) -> u16
source§fn days_in_month(&self, date: &Self::DateInner) -> u8
fn days_in_month(&self, date: &Self::DateInner) -> u8
source§fn day_of_week(&self, date: &Self::DateInner) -> IsoWeekday
fn day_of_week(&self, date: &Self::DateInner) -> IsoWeekday
source§fn is_in_leap_year(&self, date: &Self::DateInner) -> bool
fn is_in_leap_year(&self, date: &Self::DateInner) -> bool
source§fn month(&self, date: &Self::DateInner) -> MonthInfo
fn month(&self, date: &Self::DateInner) -> MonthInfo
date
source§fn day_of_month(&self, date: &Self::DateInner) -> DayOfMonth
fn day_of_month(&self, date: &Self::DateInner) -> DayOfMonth
date
source§fn day_of_year_info(&self, date: &Self::DateInner) -> DayOfYearInfo
fn day_of_year_info(&self, date: &Self::DateInner) -> DayOfYearInfo
source§fn debug_name(&self) -> &'static str
fn debug_name(&self) -> &'static str
source§fn any_calendar_kind(&self) -> Option<AnyCalendarKind>
fn any_calendar_kind(&self) -> Option<AnyCalendarKind>
AnyCalendarKind
corresponding to this calendar,
if one exists. Implementors outside of icu::calendar
should return None
source§impl From<Ethiopian> for AnyCalendar
impl From<Ethiopian> for AnyCalendar
source§fn from(value: Ethiopian) -> AnyCalendar
fn from(value: Ethiopian) -> AnyCalendar
source§impl IntoAnyCalendar for Ethiopian
impl IntoAnyCalendar for Ethiopian
source§fn to_any(self) -> AnyCalendar
fn to_any(self) -> AnyCalendar
AnyCalendar
, moving it Read moresource§fn kind(&self) -> AnyCalendarKind
fn kind(&self) -> AnyCalendarKind
AnyCalendarKind
enum variant associated with this calendarsource§fn to_any_cloned(&self) -> AnyCalendar
fn to_any_cloned(&self) -> AnyCalendar
AnyCalendar
, cloning it Read moresource§fn from_any(any: AnyCalendar) -> Result<Self, AnyCalendar>
fn from_any(any: AnyCalendar) -> Result<Self, AnyCalendar>
source§fn from_any_ref(any: &AnyCalendar) -> Option<&Self>
fn from_any_ref(any: &AnyCalendar) -> Option<&Self>
source§fn date_to_any(&self, d: &Self::DateInner) -> AnyDateInner
fn date_to_any(&self, d: &Self::DateInner) -> AnyDateInner
AnyDateInner
Read moresource§impl Ord for Ethiopian
impl Ord for Ethiopian
source§impl PartialOrd for Ethiopian
impl PartialOrd for Ethiopian
impl Copy for Ethiopian
impl Eq for Ethiopian
impl StructuralPartialEq for Ethiopian
Auto Trait Implementations§
impl Freeze for Ethiopian
impl RefUnwindSafe for Ethiopian
impl Send for Ethiopian
impl Sync for Ethiopian
impl Unpin for Ethiopian
impl UnwindSafe for Ethiopian
Blanket Implementations§
source§impl<C> AsCalendar for Cwhere
C: Calendar,
impl<C> AsCalendar for Cwhere
C: Calendar,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more