14 #ifndef __RELDATEFMT_H
15 #define __RELDATEFMT_H
19 #if U_SHOW_CPLUSPLUS_API
32 #if !UCONFIG_NO_FORMATTING
83 #ifndef U_HIDE_DEPRECATED_API
89 #endif // U_HIDE_DEPRECATED_API
190 #ifndef U_HIDE_DEPRECATED_API
196 #endif // U_HIDE_DEPRECATED_API
242 #ifndef U_HIDE_DEPRECATED_API
248 #endif // U_HIDE_DEPRECATED_API
254 class RelativeDateTimeCacheData;
255 class SharedNumberFormat;
256 class SharedPluralRules;
257 class SharedBreakIterator;
260 class FormattedRelativeDateTime;
261 class FormattedRelativeDateTimeData;
317 FormattedRelativeDateTimeData *fData;
321 explicit FormattedRelativeDateTime(
UErrorCode errorCode)
322 : fData(nullptr), fErrorCode(errorCode) {}
323 friend class RelativeDateTimeFormatter;
450 U_I18N_API RelativeDateTimeFormatter(
const RelativeDateTimeFormatter& other);
456 U_I18N_API RelativeDateTimeFormatter& operator=(
457 const RelativeDateTimeFormatter& other);
463 U_I18N_API virtual ~RelativeDateTimeFormatter();
694 const RelativeDateTimeCacheData* fCache;
695 const SharedNumberFormat *fNumberFormat;
696 const SharedPluralRules *fPluralRules;
699 #if !UCONFIG_NO_BREAK_ITERATION
700 const SharedBreakIterator *fOptBreakIterator;
702 std::nullptr_t fOptBreakIterator =
nullptr;
703 #endif // !UCONFIG_NO_BREAK_ITERATION
716 template<
typename F,
typename... Args>
723 template<
typename F,
typename... Args>
733 FormattedRelativeDateTimeData& output,
735 void formatAbsoluteImpl(
738 FormattedRelativeDateTimeData& output,
740 void formatNumericImpl(
743 FormattedRelativeDateTimeData& output,
745 void formatRelativeImpl(
748 FormattedRelativeDateTimeData& output,
One more than the highest normal UDateAbsoluteUnit value.
URelativeDateTimeUnit
Represents the unit for formatting a relative date.
UDisplayContext
Display context settings.
C API: Display context types (enum values)
#define UCONFIG_NO_BREAK_ITERATION
This switch turns off break iteration.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
#define U_I18N_API_CLASS
Set to export library symbols from inside the i18n library, and to import them from outside...
C API: URelativeDateTimeFormatter, relative date formatting of unit + numeric offset.
The BreakIterator class implements methods for finding the location of boundaries in text...
UDateRelativeDateTimeFormatterStyle
The formatting style.
UDateDirection
Represents a direction for an absolute unit e.g "Next Tuesday" or "Last Tuesday". ...
Plain, which means the absence of a qualifier.
C++ API: Common ICU base class UObject.
Represents a span of a string containing a given field.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
One more than the highest normal UDateDirection value.
UDateAbsoluteUnit
Represents an absolute unit.
C++ API: Locale ID object.
Basic definitions for ICU, for both C and C++ APIs.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
One more than the highest normal UDateRelativeUnit value.
UObject is the common ICU "boilerplate" class.
UMemory is the common ICU base class.
Requested operation can not be completed with ICU in its current state.
UDateRelativeUnit
Represents the unit for formatting a relative date.
int8_t UBool
The ICU boolean type, a signed-byte integer.
Base class for objects to which Unicode characters and strings can be appended.
A Locale object represents a specific geographical, political, or cultural region.