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

#include <ICU4XDateFormatter.hpp>

Public Member Functions

template<typename W>
diplomat::result< std::monostate, ICU4XErrorformat_date_to_writeable (const ICU4XDate &value, W &write) const
 
diplomat::result< std::string, ICU4XErrorformat_date (const ICU4XDate &value) const
 
template<typename W>
diplomat::result< std::monostate, ICU4XErrorformat_iso_date_to_writeable (const ICU4XIsoDate &value, W &write) const
 
diplomat::result< std::string, ICU4XErrorformat_iso_date (const ICU4XIsoDate &value) const
 
template<typename W>
diplomat::result< std::monostate, ICU4XErrorformat_datetime_to_writeable (const ICU4XDateTime &value, W &write) const
 
diplomat::result< std::string, ICU4XErrorformat_datetime (const ICU4XDateTime &value) const
 
template<typename W>
diplomat::result< std::monostate, ICU4XErrorformat_iso_datetime_to_writeable (const ICU4XIsoDateTime &value, W &write) const
 
diplomat::result< std::string, ICU4XErrorformat_iso_datetime (const ICU4XIsoDateTime &value) const
 
 ICU4XDateFormatter (capi::ICU4XDateFormatter *i)
 
 ICU4XDateFormatter ()=default
 
 ICU4XDateFormatter (ICU4XDateFormatter &&) noexcept=default
 
ICU4XDateFormatteroperator= (ICU4XDateFormatter &&other) noexcept=default
 

Static Public Member Functions

static diplomat::result< ICU4XDateFormatter, ICU4XErrorcreate_with_length (const ICU4XDataProvider &provider, const ICU4XLocale &locale, ICU4XDateLength date_length)
 

Detailed Description

An ICU4X DateFormatter object capable of formatting a [ICU4XDate] as a string, using some calendar specified at runtime in the locale.

See the Rust documentation for DateFormatter for more information.

Constructor & Destructor Documentation

◆ ICU4XDateFormatter() [1/3]

ICU4XDateFormatter::ICU4XDateFormatter ( capi::ICU4XDateFormatter * i)
inlineexplicit

◆ ICU4XDateFormatter() [2/3]

ICU4XDateFormatter::ICU4XDateFormatter ( )
default

◆ ICU4XDateFormatter() [3/3]

ICU4XDateFormatter::ICU4XDateFormatter ( ICU4XDateFormatter && )
defaultnoexcept

Member Function Documentation

◆ create_with_length()

diplomat::result< ICU4XDateFormatter, ICU4XError > ICU4XDateFormatter::create_with_length ( const ICU4XDataProvider & provider,
const ICU4XLocale & locale,
ICU4XDateLength date_length )
inlinestatic

Creates a new [ICU4XDateFormatter] from locale data.

See the Rust documentation for try_new_with_length for more information.

◆ format_date()

diplomat::result< std::string, ICU4XError > ICU4XDateFormatter::format_date ( const ICU4XDate & value) const
inline

Formats a [ICU4XDate] to a string.

See the Rust documentation for format for more information.

◆ format_date_to_writeable()

template<typename W>
diplomat::result< std::monostate, ICU4XError > ICU4XDateFormatter::format_date_to_writeable ( const ICU4XDate & value,
W & write ) const
inline

Formats a [ICU4XDate] to a string.

See the Rust documentation for format for more information.

◆ format_datetime()

diplomat::result< std::string, ICU4XError > ICU4XDateFormatter::format_datetime ( const ICU4XDateTime & value) const
inline

Formats a [ICU4XDateTime] to a string.

See the Rust documentation for format for more information.

◆ format_datetime_to_writeable()

template<typename W>
diplomat::result< std::monostate, ICU4XError > ICU4XDateFormatter::format_datetime_to_writeable ( const ICU4XDateTime & value,
W & write ) const
inline

Formats a [ICU4XDateTime] to a string.

See the Rust documentation for format for more information.

◆ format_iso_date()

diplomat::result< std::string, ICU4XError > ICU4XDateFormatter::format_iso_date ( const ICU4XIsoDate & value) const
inline

Formats a [ICU4XIsoDate] to a string.

Will convert to this formatter's calendar first

See the Rust documentation for format for more information.

◆ format_iso_date_to_writeable()

template<typename W>
diplomat::result< std::monostate, ICU4XError > ICU4XDateFormatter::format_iso_date_to_writeable ( const ICU4XIsoDate & value,
W & write ) const
inline

Formats a [ICU4XIsoDate] to a string.

Will convert to this formatter's calendar first

See the Rust documentation for format for more information.

◆ format_iso_datetime()

diplomat::result< std::string, ICU4XError > ICU4XDateFormatter::format_iso_datetime ( const ICU4XIsoDateTime & value) const
inline

Formats a [ICU4XIsoDateTime] to a string.

Will convert to this formatter's calendar first

See the Rust documentation for format for more information.

◆ format_iso_datetime_to_writeable()

template<typename W>
diplomat::result< std::monostate, ICU4XError > ICU4XDateFormatter::format_iso_datetime_to_writeable ( const ICU4XIsoDateTime & value,
W & write ) const
inline

Formats a [ICU4XIsoDateTime] to a string.

Will convert to this formatter's calendar first

See the Rust documentation for format for more information.

◆ operator=()

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

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