ICU4X
International Components for Unicode
Loading...
Searching...
No Matches
ICU4XIsoDate Class Reference

#include <ICU4XIsoDate.hpp>

Public Member Functions

ICU4XDate to_calendar (const ICU4XCalendar &calendar) const
 
ICU4XDate to_any () 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, ICU4XErrorweek_of_year (const ICU4XWeekCalculator &calculator) const
 
uint32_t month () const
 
int32_t year () const
 
bool is_in_leap_year () const
 
uint8_t months_in_year () const
 
uint8_t days_in_month () const
 
uint16_t days_in_year () const
 
 ICU4XIsoDate (capi::ICU4XIsoDate *i)
 
 ICU4XIsoDate ()=default
 
 ICU4XIsoDate (ICU4XIsoDate &&) noexcept=default
 
ICU4XIsoDateoperator= (ICU4XIsoDate &&other) noexcept=default
 

Static Public Member Functions

static diplomat::result< ICU4XIsoDate, ICU4XErrorcreate (int32_t year, uint8_t month, uint8_t day)
 
static ICU4XIsoDate create_for_unix_epoch ()
 

Detailed Description

An ICU4X Date object capable of containing a ISO-8601 date

See the Rust documentation for Date for more information.

Constructor & Destructor Documentation

◆ ICU4XIsoDate() [1/3]

ICU4XIsoDate::ICU4XIsoDate ( capi::ICU4XIsoDate * i)
inlineexplicit

◆ ICU4XIsoDate() [2/3]

ICU4XIsoDate::ICU4XIsoDate ( )
default

◆ ICU4XIsoDate() [3/3]

ICU4XIsoDate::ICU4XIsoDate ( ICU4XIsoDate && )
defaultnoexcept

Member Function Documentation

◆ create()

diplomat::result< ICU4XIsoDate, ICU4XError > ICU4XIsoDate::create ( int32_t year,
uint8_t month,
uint8_t day )
inlinestatic

Creates a new [ICU4XIsoDate] from the specified date and time.

See the Rust documentation for try_new_iso_date for more information.

◆ create_for_unix_epoch()

ICU4XIsoDate ICU4XIsoDate::create_for_unix_epoch ( )
inlinestatic

Creates a new [ICU4XIsoDate] representing January 1, 1970.

See the Rust documentation for unix_epoch for more information.

◆ day_of_month()

uint32_t ICU4XIsoDate::day_of_month ( ) const
inline

Returns the 1-indexed day in the month for this date

See the Rust documentation for day_of_month for more information.

◆ day_of_week()

ICU4XIsoWeekday ICU4XIsoDate::day_of_week ( ) const
inline

Returns the day in the week for this day

See the Rust documentation for day_of_week for more information.

◆ day_of_year()

uint16_t ICU4XIsoDate::day_of_year ( ) const
inline

Returns the 1-indexed day in the year for this date

See the Rust documentation for day_of_year_info for more information.

◆ days_in_month()

uint8_t ICU4XIsoDate::days_in_month ( ) const
inline

Returns the number of days in the month represented by this date

See the Rust documentation for days_in_month for more information.

◆ days_in_year()

uint16_t ICU4XIsoDate::days_in_year ( ) const
inline

Returns the number of days in the year represented by this date

See the Rust documentation for days_in_year for more information.

◆ is_in_leap_year()

bool ICU4XIsoDate::is_in_leap_year ( ) const
inline

Returns if the year is a leap year for this date

See the Rust documentation for is_in_leap_year for more information.

◆ month()

uint32_t ICU4XIsoDate::month ( ) const
inline

Returns 1-indexed number of the month of this date in its year

See the Rust documentation for month for more information.

◆ months_in_year()

uint8_t ICU4XIsoDate::months_in_year ( ) const
inline

Returns the number of months in the year represented by this date

See the Rust documentation for months_in_year for more information.

◆ operator=()

ICU4XIsoDate & ICU4XIsoDate::operator= ( ICU4XIsoDate && other)
defaultnoexcept

◆ to_any()

ICU4XDate ICU4XIsoDate::to_any ( ) const
inline

See the Rust documentation for to_any for more information.

◆ to_calendar()

ICU4XDate ICU4XIsoDate::to_calendar ( const ICU4XCalendar & calendar) const
inline

Convert this date to one in a different calendar

See the Rust documentation for to_calendar for more information.

◆ week_of_month()

uint32_t ICU4XIsoDate::week_of_month ( ICU4XIsoWeekday first_weekday) const
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.

◆ week_of_year()

diplomat::result< ICU4XWeekOf, ICU4XError > ICU4XIsoDate::week_of_year ( const ICU4XWeekCalculator & calculator) const
inline

Returns the week number in this year, using week data

See the Rust documentation for week_of_year for more information.

◆ year()

int32_t ICU4XIsoDate::year ( ) const
inline

Returns the year number for this date

See the Rust documentation for year for more information.


The documentation for this class was generated from the following file: