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() -> 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 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<<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
RataDie
Source§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 from_iso(&self, iso: IsoDateInner) -> EthiopianDateInner
fn from_iso(&self, iso: IsoDateInner) -> EthiopianDateInner
Source§fn to_iso(&self, date: &<Ethiopian as Calendar>::DateInner) -> IsoDateInner
fn to_iso(&self, date: &<Ethiopian as Calendar>::DateInner) -> IsoDateInner
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 extended_year(&self, date: &<Ethiopian as Calendar>::DateInner) -> i32
fn extended_year(&self, date: &<Ethiopian as Calendar>::DateInner) -> i32
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
date
Source§fn day_of_month(&self, date: &<Ethiopian as Calendar>::DateInner) -> DayOfMonth
fn day_of_month(&self, date: &<Ethiopian as Calendar>::DateInner) -> DayOfMonth
date
Source§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§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
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