|
ICU4X
International Components for Unicode
|
#include <Date.d.hpp>
Public Member Functions | |
| std::unique_ptr< icu4x::Date > | to_calendar (const icu4x::Calendar &calendar) const |
| std::unique_ptr< icu4x::IsoDate > | to_iso () const |
| int64_t | to_rata_die () const |
| uint16_t | day_of_year () const |
| uint8_t | day_of_month () const |
| icu4x::Weekday | day_of_week () const |
| icu4x::Weekday | weekday () const |
| uint8_t | ordinal_month () const |
| std::string | month_code () const |
| template<typename W> | |
| void | month_code_write (W &writeable_output) const |
| uint8_t | month_number () const |
| bool | month_is_leap () const |
| int32_t | era_year_or_related_iso () const |
| int32_t | extended_year () const |
| std::string | era () const |
| template<typename W> | |
| void | era_write (W &writeable_output) const |
| uint8_t | months_in_year () const |
| uint8_t | days_in_month () const |
| uint16_t | days_in_year () const |
| bool | is_in_leap_year () const |
| std::unique_ptr< icu4x::Calendar > | calendar () const |
| icu4x::diplomat::result< std::unique_ptr< icu4x::Date >, icu4x::CalendarDateAddError > | try_add_with_options (icu4x::DateDuration duration, icu4x::DateAddOptions options) const |
| icu4x::diplomat::result< icu4x::DateDuration, icu4x::CalendarMismatchedCalendarError > | try_until_with_options (const icu4x::Date &other, icu4x::DateDifferenceOptions options) const |
An ICU4X Date object capable of containing a date for any calendar.
See the Rust documentation for Date for more information.
|
inline |
Returns the Calendar object backing this date
See the Rust documentation for calendar for more information.
|
inline |
Returns the 1-indexed day in the month for this date
See the Rust documentation for day_of_month for more information.
|
inline |
Returns the day in the week for this day
This is not the day of the week, an ordinal number that is locale dependent.
See the Rust documentation for day_of_week for more information.
weekday
|
inline |
Returns the 1-indexed day in the year for this date
See the Rust documentation for day_of_year for more information.
|
inline |
Returns the number of days in the month represented by this date
See the Rust documentation for days_in_month for more information.
|
inline |
Returns the number of days in the year represented by this date
See the Rust documentation for days_in_year for more information.
|
inline |
Returns the era for this date, or an empty string
See the Rust documentation for era for more information.
Additional information: 1
|
inline |
|
inline |
Returns the year number in the current era for this date
For calendars without an era, returns the related ISO year.
See the Rust documentation for era_year_or_related_iso for more information.
|
inline |
Returns the extended year, which can be used for
This year number can be used when you need a simple numeric representation of the year, and can be meaningfully compared with extended years from other eras or used in arithmetic.
See the Rust documentation for extended_year for more information.
|
inlinestatic |
Creates a new Date from the given codes, which are interpreted in the given calendar system
An empty era code will treat the year as an extended year
See the Rust documentation for try_new for more information.
See the Rust documentation for try_from_str for more information.
|
inlinestatic |
Creates a new Date from the given fields, which are interpreted in the given calendar system.
See the Rust documentation for try_from_fields for more information.
|
inlinestatic |
Creates a new Date representing the ISO date given but in a given calendar
See the Rust documentation for new_from_iso for more information.
|
inlinestatic |
Creates a new Date from the given Rata Die
See the Rust documentation for from_rata_die for more information.
|
inlinestatic |
Creates a new Date from an IXDTF string.
See the Rust documentation for try_from_str for more information.
|
inline |
Returns if the year is a leap year for this date
See the Rust documentation for is_in_leap_year for more information.
|
inline |
Returns the month code for this date. Typically something like "M01", "M02", but can be more complicated for lunar calendars.
See the Rust documentation for code for more information.
See the Rust documentation for standard_code for more information.
Additional information: 1
|
inline |
|
inline |
Returns whether the month is a leap month.
See the Rust documentation for is_leap for more information.
|
inline |
Returns the month number of this month.
See the Rust documentation for number for more information.
|
inline |
Returns the number of months in the year represented by this date
See the Rust documentation for months_in_year for more information.
|
inlinestatic |
|
inline |
Returns 1-indexed number of the month of this date in its year
Note that for lunar calendars this may not lead to the same month having the same ordinal month across years; use month_code if you care about month identity.
See the Rust documentation for month for more information.
See the Rust documentation for ordinal for more information.
|
inline |
Convert this date to one in a different calendar
See the Rust documentation for to_calendar for more information.
|
inline |
Converts this date to ISO
See the Rust documentation for to_iso for more information.
|
inline |
Returns this date's Rata Die
See the Rust documentation for to_rata_die for more information.
|
inline |
Returns a new Date with the given duration added to it.
See the Rust documentation for try_added_with_options for more information.
|
inline |
Calculating the duration between other - self
See the Rust documentation for try_until_with_options for more information.
|
inline |
Returns the day in the week for this day
See the Rust documentation for weekday for more information.