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 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 always uses the aa era, where 1 Amete Alem is 5493 BCE. Dates before this era use negative years.
Dates before that use negative year numbers.
In the Amete Mihret scheme it uses the additional am era, 1 Amete Mihret is 9 CE.
§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 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§fn from_codes(
&self,
era: Option<&str>,
year: i32,
month_code: MonthCode,
day: u8,
) -> Result<Self::DateInner, DateError>
fn from_codes( &self, era: Option<&str>, year: i32, month_code: MonthCode, day: u8, ) -> Result<Self::DateInner, DateError>
Source§fn from_iso(&self, iso: IsoDateInner) -> EthiopianDateInner
fn from_iso(&self, iso: IsoDateInner) -> 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 extended_year(&self, date: &Self::DateInner) -> i32
fn extended_year(&self, date: &Self::DateInner) -> i32
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
dateSource§fn day_of_month(&self, date: &Self::DateInner) -> DayOfMonth
fn day_of_month(&self, date: &Self::DateInner) -> DayOfMonth
dateSource§fn day_of_year(&self, date: &Self::DateInner) -> DayOfYear
fn day_of_year(&self, date: &Self::DateInner) -> DayOfYear
Source§fn debug_name(&self) -> &'static str
fn debug_name(&self) -> &'static str
Source§fn calendar_algorithm(&self) -> Option<CalendarAlgorithm>
fn calendar_algorithm(&self) -> Option<CalendarAlgorithm>
CalendarAlgorithm that is required to match
when parsing into this calendar. Read moreSource§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 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
impl UnstableSealed 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§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