pub struct Ethiopian(/* private fields */);Expand description
The Ethiopian calendar is a variant of the Coptic calendar. It differs
from the Coptic calendar by the names of the months as well as the era.
This implementation 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.
This implementation extends proleptically for dates before the calendar’s creation.
This corresponds to the "ethiopic" and "ethioaa" CLDR calendars,
with "ethiopic" being for EthiopianEraStyle::AmeteMihret
§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.
§Months and days
The 13 months are called Mäskäräm (M01, 30 days), Ṭəqəmt (M02, 30 days),
Ḫədar (M03, 30 days), Taḫśaś (M04, 30 days), Ṭərr (M05, 30 days), Yäkatit (M06, 30 days),
Mägabit (M07, 30 days), Miyazya (M08, 30 days), Gənbo (M09, 30 days),
Säne (M10, 30 days), Ḥamle (M11, 30 days), Nähase (M12, 30 days), Ṗagʷəmen (M13, 5 days).
In leap years (years divisible by 4), Ṗagʷəmen gains a 6th day.
Standard years thus have 365 days, and leap years 366.
§Calendar drift
The Ethiopian calendar has the same year lengths and leap year rules as the Coptic and
Julian calendars, so it experiences the same drift of 1 day in ~128
years with respect to the seasons.
Implementations§
Source§impl Ethiopian
impl Ethiopian
Sourcepub const fn new() -> Ethiopian
pub const fn new() -> Ethiopian
Construct a new Ethiopian Calendar for the Amete Mihret era naming scheme
Sourcepub const fn new_with_era_style(era_style: EthiopianEraStyle) -> Ethiopian
pub const fn new_with_era_style(era_style: EthiopianEraStyle) -> Ethiopian
Construct a new Ethiopian Calendar with an explicit EthiopianEraStyle.
Sourcepub fn era_style(&self) -> EthiopianEraStyle
pub fn era_style(&self) -> EthiopianEraStyle
Returns the EthiopianEraStyle used by this calendar.
Trait Implementations§
Source§impl Calendar for Ethiopian
impl Calendar for Ethiopian
Source§type DifferenceError = <Coptic as Calendar>::DifferenceError
type DifferenceError = <Coptic as Calendar>::DifferenceError
untilSource§fn from_codes(
&self,
era: Option<&str>,
year: i32,
month_code: MonthCode,
day: u8,
) -> Result<<Ethiopian as Calendar>::DateInner, DateError>
fn from_codes( &self, era: Option<&str>, year: i32, month_code: MonthCode, day: u8, ) -> Result<<Ethiopian as Calendar>::DateInner, DateError>
Source§fn from_rata_die(&self, rd: RataDie) -> <Ethiopian as Calendar>::DateInner
fn from_rata_die(&self, rd: RataDie) -> <Ethiopian as Calendar>::DateInner
RataDieSource§fn to_rata_die(&self, date: &<Ethiopian as Calendar>::DateInner) -> RataDie
fn to_rata_die(&self, date: &<Ethiopian as Calendar>::DateInner) -> RataDie
RataDie from this dateSource§fn has_cheap_iso_conversion(&self) -> bool
fn has_cheap_iso_conversion(&self) -> bool
from_iso/to_iso is more efficient
than from_rata_die/to_rata_die.Source§fn months_in_year(&self, date: &<Ethiopian as Calendar>::DateInner) -> u8
fn months_in_year(&self, date: &<Ethiopian as Calendar>::DateInner) -> u8
Source§fn days_in_year(&self, date: &<Ethiopian as Calendar>::DateInner) -> u16
fn days_in_year(&self, date: &<Ethiopian as Calendar>::DateInner) -> u16
Source§fn days_in_month(&self, date: &<Ethiopian as Calendar>::DateInner) -> u8
fn days_in_month(&self, date: &<Ethiopian as Calendar>::DateInner) -> u8
Source§fn year_info(
&self,
date: &<Ethiopian as Calendar>::DateInner,
) -> <Ethiopian as Calendar>::Year
fn year_info( &self, date: &<Ethiopian as Calendar>::DateInner, ) -> <Ethiopian as Calendar>::Year
Source§fn is_in_leap_year(&self, date: &<Ethiopian as Calendar>::DateInner) -> bool
fn is_in_leap_year(&self, date: &<Ethiopian as Calendar>::DateInner) -> bool
Source§fn month(&self, date: &<Ethiopian as Calendar>::DateInner) -> MonthInfo
fn month(&self, date: &<Ethiopian as Calendar>::DateInner) -> MonthInfo
dateSource§fn day_of_month(&self, date: &<Ethiopian as Calendar>::DateInner) -> DayOfMonth
fn day_of_month(&self, date: &<Ethiopian as Calendar>::DateInner) -> DayOfMonth
dateSource§fn day_of_year(&self, date: &<Ethiopian as Calendar>::DateInner) -> DayOfYear
fn day_of_year(&self, date: &<Ethiopian as Calendar>::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§fn from_iso(&self, iso: IsoDateInner) -> Self::DateInner
fn from_iso(&self, iso: IsoDateInner) -> Self::DateInner
Source§fn to_iso(&self, date: &Self::DateInner) -> IsoDateInner
fn to_iso(&self, date: &Self::DateInner) -> IsoDateInner
Source§fn extended_year(&self, date: &Self::DateInner) -> i32
fn extended_year(&self, date: &Self::DateInner) -> i32
Source§impl CldrCalendar for Ethiopian
impl CldrCalendar for Ethiopian
Source§type YearNamesV1 = DatetimeNamesYearEthiopianV1
type YearNamesV1 = DatetimeNamesYearEthiopianV1
Source§type MonthNamesV1 = DatetimeNamesMonthEthiopianV1
type MonthNamesV1 = DatetimeNamesMonthEthiopianV1
Source§type SkeletaV1 = DatetimePatternsDateEthiopianV1
type SkeletaV1 = DatetimePatternsDateEthiopianV1
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 from_any(any: AnyCalendar) -> Result<Ethiopian, AnyCalendar>
fn from_any(any: AnyCalendar) -> Result<Ethiopian, AnyCalendar>
Source§fn from_any_ref(any: &AnyCalendar) -> Option<&Ethiopian>
fn from_any_ref(any: &AnyCalendar) -> Option<&Ethiopian>
Source§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 IntoFormattableAnyCalendar 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> GetField<T> for Twhere
T: Copy + UnstableSealed,
impl<T> GetField<T> for Twhere
T: Copy + UnstableSealed,
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