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

#include <ICU4XIsoDateTime.hpp>

Public Member Functions

ICU4XIsoDate date () const
 
ICU4XTime time () const
 
ICU4XDateTime to_any () const
 
int32_t minutes_since_local_unix_epoch () 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, 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
 
 ICU4XIsoDateTime (capi::ICU4XIsoDateTime *i)
 
 ICU4XIsoDateTime ()=default
 
 ICU4XIsoDateTime (ICU4XIsoDateTime &&) noexcept=default
 
ICU4XIsoDateTimeoperator= (ICU4XIsoDateTime &&other) noexcept=default
 

Static Public Member Functions

static diplomat::result< ICU4XIsoDateTime, ICU4XErrorcreate (int32_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t nanosecond)
 
static ICU4XIsoDateTime crate_from_date_and_time (const ICU4XIsoDate &date, const ICU4XTime &time)
 
static ICU4XIsoDateTime local_unix_epoch ()
 
static ICU4XIsoDateTime create_from_minutes_since_local_unix_epoch (int32_t minutes)
 

Detailed Description

An ICU4X DateTime object capable of containing a ISO-8601 date and time.

See the Rust documentation for DateTime for more information.

Constructor & Destructor Documentation

◆ ICU4XIsoDateTime() [1/3]

ICU4XIsoDateTime::ICU4XIsoDateTime ( capi::ICU4XIsoDateTime * i)
inlineexplicit

◆ ICU4XIsoDateTime() [2/3]

ICU4XIsoDateTime::ICU4XIsoDateTime ( )
default

◆ ICU4XIsoDateTime() [3/3]

ICU4XIsoDateTime::ICU4XIsoDateTime ( ICU4XIsoDateTime && )
defaultnoexcept

Member Function Documentation

◆ crate_from_date_and_time()

ICU4XIsoDateTime ICU4XIsoDateTime::crate_from_date_and_time ( const ICU4XIsoDate & date,
const ICU4XTime & time )
inlinestatic

Creates a new [ICU4XIsoDateTime] from an [ICU4XIsoDate] and [ICU4XTime] object

See the Rust documentation for new for more information.

◆ create()

diplomat::result< ICU4XIsoDateTime, ICU4XError > ICU4XIsoDateTime::create ( int32_t year,
uint8_t month,
uint8_t day,
uint8_t hour,
uint8_t minute,
uint8_t second,
uint32_t nanosecond )
inlinestatic

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

See the Rust documentation for try_new_iso_datetime for more information.

◆ create_from_minutes_since_local_unix_epoch()

ICU4XIsoDateTime ICU4XIsoDateTime::create_from_minutes_since_local_unix_epoch ( int32_t minutes)
inlinestatic

Construct from the minutes since the local unix epoch for this date (Jan 1 1970, 00:00)

See the Rust documentation for from_minutes_since_local_unix_epoch for more information.

◆ date()

ICU4XIsoDate ICU4XIsoDateTime::date ( ) const
inline

Gets the date contained in this object

See the Rust documentation for date for more information.

◆ day_of_month()

uint32_t ICU4XIsoDateTime::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 ICU4XIsoDateTime::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 ICU4XIsoDateTime::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 ICU4XIsoDateTime::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 ICU4XIsoDateTime::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.

◆ hour()

uint8_t ICU4XIsoDateTime::hour ( ) const
inline

Returns the hour in this time

See the Rust documentation for hour for more information.

◆ is_in_leap_year()

bool ICU4XIsoDateTime::is_in_leap_year ( ) const
inline

Returns whether this date is in a leap year

See the Rust documentation for is_in_leap_year for more information.

◆ local_unix_epoch()

ICU4XIsoDateTime ICU4XIsoDateTime::local_unix_epoch ( )
inlinestatic

Creates a new [ICU4XIsoDateTime] of midnight on January 1, 1970

See the Rust documentation for local_unix_epoch for more information.

◆ minute()

uint8_t ICU4XIsoDateTime::minute ( ) const
inline

Returns the minute in this time

See the Rust documentation for minute for more information.

◆ minutes_since_local_unix_epoch()

int32_t ICU4XIsoDateTime::minutes_since_local_unix_epoch ( ) const
inline

Gets the minutes since the local unix epoch for this date (Jan 1 1970, 00:00)

See the Rust documentation for minutes_since_local_unix_epoch for more information.

◆ month()

uint32_t ICU4XIsoDateTime::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 ICU4XIsoDateTime::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.

◆ nanosecond()

uint32_t ICU4XIsoDateTime::nanosecond ( ) const
inline

Returns the nanosecond in this time

See the Rust documentation for nanosecond for more information.

◆ operator=()

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

◆ second()

uint8_t ICU4XIsoDateTime::second ( ) const
inline

Returns the second in this time

See the Rust documentation for second for more information.

◆ time()

ICU4XTime ICU4XIsoDateTime::time ( ) const
inline

Gets the time contained in this object

See the Rust documentation for time for more information.

◆ to_any()

ICU4XDateTime ICU4XIsoDateTime::to_any ( ) const
inline

Converts this to an [ICU4XDateTime] capable of being mixed with dates of other calendars

See the Rust documentation for to_any for more information.

◆ to_calendar()

ICU4XDateTime ICU4XIsoDateTime::to_calendar ( const ICU4XCalendar & calendar) const
inline

Convert this datetime to one in a different calendar

See the Rust documentation for to_calendar for more information.

◆ week_of_month()

uint32_t ICU4XIsoDateTime::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 > ICU4XIsoDateTime::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 ICU4XIsoDateTime::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: