ICU4X
International Components for Unicode
|
#include <ICU4XDateTime.hpp>
Public Member Functions | |
ICU4XDate | date () const |
ICU4XTime | time () const |
ICU4XIsoDateTime | to_iso () const |
ICU4XDateTime | to_calendar (const ICU4XCalendar &calendar) const |
uint8_t | hour () const |
uint8_t | minute () const |
uint8_t | second () const |
uint32_t | nanosecond () const |
uint16_t | day_of_year () const |
uint32_t | day_of_month () const |
ICU4XIsoWeekday | day_of_week () const |
uint32_t | week_of_month (ICU4XIsoWeekday first_weekday) const |
diplomat::result< ICU4XWeekOf, ICU4XError > | week_of_year (const ICU4XWeekCalculator &calculator) const |
uint32_t | ordinal_month () const |
template<typename W> | |
diplomat::result< std::monostate, ICU4XError > | month_code_to_writeable (W &write) const |
diplomat::result< std::string, ICU4XError > | month_code () const |
int32_t | year_in_era () const |
template<typename W> | |
diplomat::result< std::monostate, ICU4XError > | era_to_writeable (W &write) const |
diplomat::result< std::string, ICU4XError > | era () const |
uint8_t | months_in_year () const |
uint8_t | days_in_month () const |
uint16_t | days_in_year () const |
ICU4XCalendar | calendar () const |
ICU4XDateTime (capi::ICU4XDateTime *i) | |
ICU4XDateTime ()=default | |
ICU4XDateTime (ICU4XDateTime &&) noexcept=default | |
ICU4XDateTime & | operator= (ICU4XDateTime &&other) noexcept=default |
Static Public Member Functions | |
static diplomat::result< ICU4XDateTime, ICU4XError > | create_from_iso_in_calendar (int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar &calendar) |
static diplomat::result< ICU4XDateTime, ICU4XError > | create_from_codes_in_calendar (const std::string_view era_code, int32_t year, const std::string_view month_code, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond, const ICU4XCalendar &calendar) |
static ICU4XDateTime | create_from_date_and_time (const ICU4XDate &date, const ICU4XTime &time) |
An ICU4X DateTime object capable of containing a date and time for any calendar.
See the Rust documentation for DateTime
for more information.
|
inlineexplicit |
|
default |
|
defaultnoexcept |
|
inline |
Returns the [ICU4XCalendar
] object backing this date
See the Rust documentation for calendar
for more information.
|
inlinestatic |
Creates a new [ICU4XDateTime
] from the given codes, which are interpreted in the given calendar system
See the Rust documentation for try_new_from_codes
for more information.
|
inlinestatic |
Creates a new [ICU4XDateTime
] from an [ICU4XDate
] and [ICU4XTime
] object
See the Rust documentation for new
for more information.
|
inlinestatic |
Creates a new [ICU4XDateTime
] representing the ISO date and time given but in a given calendar
See the Rust documentation for new_from_iso
for more information.
|
inline |
Gets a copy of the date contained in this object
See the Rust documentation for date
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
See the Rust documentation for day_of_week
for more information.
|
inline |
Returns the 1-indexed day in the year for this date
See the Rust documentation for day_of_year_info
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,
See the Rust documentation for year
for more information.
|
inline |
Returns the era for this date,
See the Rust documentation for year
for more information.
|
inline |
Returns the hour in this time
See the Rust documentation for hour
for more information.
|
inline |
Returns the minute in this time
See the Rust documentation for minute
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 month
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 month
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.
|
inline |
Returns the nanosecond in this time
See the Rust documentation for nanosecond
for more information.
|
defaultnoexcept |
|
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.
|
inline |
Returns the second in this time
See the Rust documentation for second
for more information.
|
inline |
Gets the time contained in this object
See the Rust documentation for time
for more information.
|
inline |
Convert this datetime 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 the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
first_weekday
can be obtained via first_weekday()
on [ICU4XWeekCalculator
]
See the Rust documentation for week_of_month
for more information.
|
inline |
Returns the week number in this year, using week data
See the Rust documentation for week_of_year
for more information.
|
inline |
Returns the year number in the current era for this date
See the Rust documentation for year
for more information.