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

#include <ICU4XDateTimeFormatter.hpp>

Public Member Functions

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
 
 ICU4XDateTimeFormatter (capi::ICU4XDateTimeFormatter *i)
 
 ICU4XDateTimeFormatter ()=default
 
 ICU4XDateTimeFormatter (ICU4XDateTimeFormatter &&) noexcept=default
 
ICU4XDateTimeFormatteroperator= (ICU4XDateTimeFormatter &&other) noexcept=default
 

Static Public Member Functions

static diplomat::result< ICU4XDateTimeFormatter, ICU4XErrorcreate_with_lengths (const ICU4XDataProvider &provider, const ICU4XLocale &locale, ICU4XDateLength date_length, ICU4XTimeLength time_length)
 

Detailed Description

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

See the Rust documentation for DateTimeFormatter for more information.

Constructor & Destructor Documentation

◆ ICU4XDateTimeFormatter() [1/3]

ICU4XDateTimeFormatter::ICU4XDateTimeFormatter ( capi::ICU4XDateTimeFormatter * i)
inlineexplicit

◆ ICU4XDateTimeFormatter() [2/3]

ICU4XDateTimeFormatter::ICU4XDateTimeFormatter ( )
default

◆ ICU4XDateTimeFormatter() [3/3]

ICU4XDateTimeFormatter::ICU4XDateTimeFormatter ( ICU4XDateTimeFormatter && )
defaultnoexcept

Member Function Documentation

◆ create_with_lengths()

diplomat::result< ICU4XDateTimeFormatter, ICU4XError > ICU4XDateTimeFormatter::create_with_lengths ( const ICU4XDataProvider & provider,
const ICU4XLocale & locale,
ICU4XDateLength date_length,
ICU4XTimeLength time_length )
inlinestatic

Creates a new [ICU4XDateTimeFormatter] from locale data.

See the Rust documentation for try_new for more information.

◆ format_datetime()

diplomat::result< std::string, ICU4XError > ICU4XDateTimeFormatter::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 > ICU4XDateTimeFormatter::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_datetime()

diplomat::result< std::string, ICU4XError > ICU4XDateTimeFormatter::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 > ICU4XDateTimeFormatter::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=()

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

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