pub struct Ethiopian(_);
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.
Implementations§
source§impl Ethiopian
impl Ethiopian
sourcepub fn new() -> Ethiopian
pub fn new() -> Ethiopian
Construct a new Ethiopian Calendar for the Amete Mihret era naming scheme
sourcepub fn new_with_era_style(era_style: EthiopianEraStyle) -> Ethiopian
pub 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 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
§type DateInner = EthiopianDateInner
type DateInner = EthiopianDateInner
source§fn date_from_codes(
&self,
era: Era,
year: i32,
month_code: MonthCode,
day: u8
) -> Result<<Ethiopian as Calendar>::DateInner, CalendarError>
fn date_from_codes( &self, era: Era, year: i32, month_code: MonthCode, day: u8 ) -> Result<<Ethiopian as Calendar>::DateInner, CalendarError>
source§fn date_from_iso(&self, iso: Date<Iso>) -> EthiopianDateInner
fn date_from_iso(&self, iso: Date<Iso>) -> EthiopianDateInner
source§fn date_to_iso(&self, date: &<Ethiopian as Calendar>::DateInner) -> Date<Iso>
fn date_to_iso(&self, date: &<Ethiopian as Calendar>::DateInner) -> Date<Iso>
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) -> u32
fn days_in_year(&self, date: &<Ethiopian as Calendar>::DateInner) -> u32
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 day_of_week(&self, date: &<Ethiopian as Calendar>::DateInner) -> IsoWeekday
fn day_of_week(&self, date: &<Ethiopian as Calendar>::DateInner) -> IsoWeekday
source§fn year(&self, date: &<Ethiopian as Calendar>::DateInner) -> FormattableYear
fn year(&self, date: &<Ethiopian as Calendar>::DateInner) -> FormattableYear
date
source§fn month(&self, date: &<Ethiopian as Calendar>::DateInner) -> FormattableMonth
fn month(&self, date: &<Ethiopian as Calendar>::DateInner) -> FormattableMonth
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_info(
&self,
date: &<Ethiopian as Calendar>::DateInner
) -> DayOfYearInfo
fn day_of_year_info( &self, date: &<Ethiopian as Calendar>::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 Nonesource§impl CldrCalendar for Ethiopian
impl CldrCalendar for Ethiopian
source§const DEFAULT_BCP_47_IDENTIFIER: Value = {
const R: ::icu_locid::extensions::unicode::Value =
::icu_locid::extensions::unicode::Value::from_tinystr(match ::icu_locid::extensions::unicode::Value::subtag_from_bytes("ethiopic".as_bytes())
{
Ok(r) => r,
_ =>
::core::panicking::panic_fmt(<#[lang = "format_arguments"]>::new_const(&["Invalid Unicode extension value: ethiopic"])),
});
R
}
const DEFAULT_BCP_47_IDENTIFIER: Value = { const R: ::icu_locid::extensions::unicode::Value = ::icu_locid::extensions::unicode::Value::from_tinystr(match ::icu_locid::extensions::unicode::Value::subtag_from_bytes("ethiopic".as_bytes()) { Ok(r) => r, _ => ::core::panicking::panic_fmt(<#[lang = "format_arguments"]>::new_const(&["Invalid Unicode extension value: ethiopic"])), }); R }
§type DateSymbolsV1Marker = EthiopianDateSymbolsV1Marker
type DateSymbolsV1Marker = EthiopianDateSymbolsV1Marker
§type DateLengthsV1Marker = EthiopianDateLengthsV1Marker
type DateLengthsV1Marker = EthiopianDateLengthsV1Marker
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: &<Ethiopian as Calendar>::DateInner) -> AnyDateInner
fn date_to_any(&self, d: &<Ethiopian as Calendar>::DateInner) -> AnyDateInner
AnyDateInner
Read more