Struct icu_calendar::ethiopian::Ethiopian
source · pub struct Ethiopian(pub(crate) bool);
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.
Tuple Fields§
§0: bool
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
fn fixed_from_ethiopian(date: ArithmeticDate<Ethiopian>) -> RataDie
fn ethiopian_from_fixed(date: RataDie) -> EthiopianDateInner
fn days_in_year_direct(year: i32) -> u16
fn year_as_ethiopian(year: i32, amete_alem: bool) -> FormattableYear
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: Era,
year: i32,
month_code: MonthCode,
day: u8,
) -> Result<Self::DateInner, CalendarError>
fn date_from_codes( &self, era: Era, year: i32, month_code: MonthCode, day: u8, ) -> Result<Self::DateInner, CalendarError>
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 year(&self, date: &Self::DateInner) -> FormattableYear
fn year(&self, date: &Self::DateInner) -> FormattableYear
date
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) -> FormattableMonth
fn month(&self, date: &Self::DateInner) -> FormattableMonth
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 CalendarArithmetic for Ethiopian
impl CalendarArithmetic for Ethiopian
source§type YearInfo = ()
type YearInfo = ()
fn month_days(year: i32, month: u8, _data: ()) -> u8
fn months_for_every_year(_: i32, _data: ()) -> u8
fn is_leap_year(year: i32, _data: ()) -> bool
fn last_month_day_in_year(year: i32, _data: ()) -> (u8, u8)
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 to_any_cloned(&self) -> AnyCalendar
fn to_any_cloned(&self) -> AnyCalendar
AnyCalendar
, cloning it Read moresource§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
)