pub struct JapaneseExtended(_);
Expand description

The Japanese Calendar (with historical eras)

The Japanese calendar is a solar calendar used in Japan, with twelve months. The months and days are identical to that of the Gregorian calendar, however the years are counted differently using the Japanese era system.

This type can be used with Date or DateTime to represent dates in this calendar.

Era codes

This calendar supports a large number of era codes. It supports the five post-Meiji eras ("meiji", "taisho", "showa", "heisei", "reiwa"). Pre-Meiji eras are represented with their names converted to lowercase ascii and followed by their start year. E.g. the “Ten’ō” era (781 - 782 CE) has the code "teno-781". The Gregorian "bce" and "ce" eras are used for dates before the first known era era.

These eras are loaded from data, requiring a data provider capable of providing JapaneseExtendedErasV1Marker data (calendar/japanext@1).

Implementations

Creates a new Japanese from locale data using all eras (including pre-meiji).

📚 Help choosing a constructor

⚠️ The bounds on this function may change over time, including in SemVer minor releases.

Creates a new instance using an AnyProvider.

For details on the behavior of this function, see: Self::try_new_unstable

📚 Help choosing a constructor

Enabled with the "serde" feature.

Creates a new instance using a BufferProvider.

For details on the behavior of this function, see: Self::try_new_unstable

📚 Help choosing a constructor

Trait Implementations

The calendar-specific year represented by date

The calendar-specific month represented by date

The calendar-specific day-of-month represented by date

Information of the day of the year

The internal type used to represent dates

Construct a date from era/month codes and fields

Construct the date from an ISO date

Obtain an ISO date from this date

Count the number of months in a given year, specified by providing a date from that year Read more

Count the number of days in a given year, specified by providing a date from that year Read more

Count the number of days in a given month, specified by providing a date from that year/month Read more

Obtain a name for the calendar for debug printing

The AnyCalendarKind corresponding to this calendar, if one exists. Implementors outside of icu_calendar should return None Read more

Calculate the day of the week and return it

The Unicode BCP 47 identifier for the calendar If multiple BCP 47 identifiers work, this should be the default one when no others are provided Read more

The data marker for loading symbols for this calendar.

The data marker for loading length-patterns for this calendar.

Checks if a given BCP 47 identifier is allowed to be used with this calendar Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Convert this calendar into an AnyCalendar, moving it Read more

Convert this calendar into an AnyCalendar, cloning it Read more

Convert a date for this calendar into an AnyDateInner Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The calendar being wrapped

Obtain the inner calendar

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.