15 #if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION 64 #ifndef U_HIDE_DEPRECATED_API 169 #ifndef U_HIDE_DEPRECATED_API 178 #ifndef U_HIDE_DRAFT_API 196 #endif // U_HIDE_DRAFT_API 255 #ifndef U_HIDE_DRAFT_API 303 #if U_SHOW_CPLUSPLUS_API 318 #ifndef U_HIDE_DRAFT_API 368 int32_t resultCapacity,
371 #ifndef U_HIDE_DRAFT_API 437 int32_t resultCapacity,
440 #ifndef U_HIDE_DRAFT_API 507 const UChar * relativeDateString,
508 int32_t relativeDateStringLen,
509 const UChar * timeString,
510 int32_t timeStringLen,
512 int32_t resultCapacity,
Represents a number quantity, like "3" in "3 days ago".
Represents a literal text string, like "tomorrow" or "days ago".
URelativeDateTimeUnit
Represents the unit for formatting a relative date.
int32_t ureldatefmt_formatNumeric(const URelativeDateTimeFormatter *reldatefmt, double offset, URelativeDateTimeUnit unit, UChar *result, int32_t resultCapacity, UErrorCode *status)
Format a combination of URelativeDateTimeUnit and numeric offset using a numeric style, e.g.
void ureldatefmt_close(URelativeDateTimeFormatter *reldatefmt)
Close a URelativeDateTimeFormatter object.
Specifies that relative unit is second, e.g.
struct URelativeDateTimeFormatter URelativeDateTimeFormatter
C typedef for struct URelativeDateTimeFormatter.
Specifies that relative unit is week, e.g.
Specifies that relative unit is month, e.g.
struct UFormattedRelativeDateTime UFormattedRelativeDateTime
Opaque struct to contain the results of a URelativeDateTimeFormatter operation.
UDisplayContext
Display context settings.
URelativeDateTimeFormatterField
FieldPosition and UFieldPosition selectors for format fields defined by RelativeDateTimeFormatter.
void ureldatefmt_formatNumericToResult(const URelativeDateTimeFormatter *reldatefmt, double offset, URelativeDateTimeUnit unit, UFormattedRelativeDateTime *result, UErrorCode *status)
Format a combination of URelativeDateTimeUnit and numeric offset using a numeric style, e.g.
Specifies that relative unit is Friday, e.g.
Specifies that relative unit is Monday, e.g.
Specifies that relative unit is Saturday, e.g.
C API: Display context types (enum values)
Specifies that relative unit is minute, e.g.
Specifies that relative unit is Wednesday, e.g.
Abbreviations used when possible.
Specifies that relative unit is Sunday, e.g.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
int32_t ureldatefmt_format(const URelativeDateTimeFormatter *reldatefmt, double offset, URelativeDateTimeUnit unit, UChar *result, int32_t resultCapacity, UErrorCode *status)
Format a combination of URelativeDateTimeUnit and numeric offset using a text style if possible...
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
void * UNumberFormat
A number formatter.
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
URelativeDateTimeFormatter * ureldatefmt_open(const char *locale, UNumberFormat *nfToAdopt, UDateRelativeDateTimeFormatterStyle width, UDisplayContext capitalizationContext, UErrorCode *status)
Open a new URelativeDateTimeFormatter object for a given locale using the specified width and capital...
One more than the highest normal UDateRelativeDateTimeFormatterStyle value.
void ureldatefmt_formatToResult(const URelativeDateTimeFormatter *reldatefmt, double offset, URelativeDateTimeUnit unit, UFormattedRelativeDateTime *result, UErrorCode *status)
Format a combination of URelativeDateTimeUnit and numeric offset using a text style if possible...
Specifies that relative unit is quarter, e.g.
UDateRelativeDateTimeFormatterStyle
The formatting style.
Specifies that relative unit is hour, e.g.
Use the shortest possible form.
void ureldatefmt_closeResult(UFormattedRelativeDateTime *ufrdt)
Releases the UFormattedRelativeDateTime created by ureldatefmt_openResult.
Specifies that relative unit is year, e.g.
const UFormattedValue * ureldatefmt_resultAsValue(const UFormattedRelativeDateTime *ufrdt, UErrorCode *ec)
Returns a representation of a UFormattedRelativeDateTime as a UFormattedValue, which can be subsequen...
uint16_t UChar
The base type for UTF-16 code units and pointers.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Specifies that relative unit is Tuesday, e.g.
Specifies that relative unit is day, e.g.
Basic definitions for ICU, for both C and C++ APIs.
Specifies that relative unit is Thursday, e.g.
UFormattedRelativeDateTime * ureldatefmt_openResult(UErrorCode *ec)
Creates an object to hold the result of a URelativeDateTimeFormatter operation.
One more than the highest normal URelativeDateTimeUnit value.
#define U_DRAFT
This is used to declare a function as a draft public ICU C API.
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
C API: Compatibility APIs for number formatting.
int32_t ureldatefmt_combineDateAndTime(const URelativeDateTimeFormatter *reldatefmt, const UChar *relativeDateString, int32_t relativeDateStringLen, const UChar *timeString, int32_t timeStringLen, UChar *result, int32_t resultCapacity, UErrorCode *status)
Combines a relative date string and a time string in this object's locale.