Go to the documentation of this file.
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
178 #ifndef U_HIDE_DRAFT_API
190 #endif // U_HIDE_DRAFT_API
192 #ifndef U_HIDE_DEPRECATED_API
198 #endif // U_HIDE_DEPRECATED_API
244 #ifndef U_HIDE_DEPRECATED_API
250 #endif // U_HIDE_DEPRECATED_API
253 #if !UCONFIG_NO_BREAK_ITERATION
258 class RelativeDateTimeCacheData;
259 class SharedNumberFormat;
260 class SharedPluralRules;
261 class SharedBreakIterator;
264 class FormattedRelativeDateTime;
265 class FormattedRelativeDateTimeData;
321 FormattedRelativeDateTimeData *fData;
325 explicit FormattedRelativeDateTime(
UErrorCode errorCode)
326 : fData(nullptr), fErrorCode(errorCode) {}
327 friend class RelativeDateTimeFormatter;
696 const RelativeDateTimeCacheData* fCache;
697 const SharedNumberFormat *fNumberFormat;
698 const SharedPluralRules *fPluralRules;
701 const SharedBreakIterator *fOptBreakIterator;
710 template<
typename F,
typename... Args>
717 template<
typename F,
typename... Args>
727 FormattedRelativeDateTimeData& output,
729 void formatAbsoluteImpl(
732 FormattedRelativeDateTimeData& output,
734 void formatNumericImpl(
737 FormattedRelativeDateTimeData& output,
739 void formatRelativeImpl(
742 FormattedRelativeDateTimeData& output,
@ UDAT_ABSOLUTE_WEDNESDAY
Wednesday.
@ UDAT_DIRECTION_LAST
Last.
@ UDAT_RELATIVE_SECONDS
Seconds.
The BreakIterator class implements methods for finding the location of boundaries in text.
@ UDAT_RELATIVE_MONTHS
Months.
@ UDAT_ABSOLUTE_TUESDAY
Tuesday.
Basic definitions for ICU, for both C and C++ APIs.
@ UDAT_RELATIVE_MINUTES
Minutes.
@ UDAT_ABSOLUTE_MINUTE
Minute.
int8_t UBool
The ICU boolean type.
URelativeDateTimeUnit
Represents the unit for formatting a relative date.
@ UDAT_ABSOLUTE_YEAR
Year.
@ UDAT_RELATIVE_YEARS
Years.
@ UDAT_RELATIVE_HOURS
Hours.
@ UDAT_DIRECTION_COUNT
One more than the highest normal UDateDirection value.
@ UDAT_ABSOLUTE_QUARTER
Quarter.
@ UDAT_ABSOLUTE_MONDAY
Monday.
@ UDAT_ABSOLUTE_WEEK
Week.
@ UDAT_RELATIVE_DAYS
Days.
@ UDAT_ABSOLUTE_FRIDAY
Friday.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
C API: URelativeDateTimeFormatter, relative date formatting of unit + numeric offset.
UDateDirection
Represents a direction for an absolute unit e.g "Next Tuesday" or "Last Tuesday".
UObject is the common ICU "boilerplate" class.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
UMemory is the common ICU base class.
@ UDAT_DIRECTION_THIS
This.
@ UDAT_ABSOLUTE_SUNDAY
Sunday.
@ UDAT_DIRECTION_PLAIN
Plain, which means the absence of a qualifier.
@ U_ZERO_ERROR
No error, no warning.
@ UDAT_ABSOLUTE_SATURDAY
Saturday.
@ UDAT_RELATIVE_UNIT_COUNT
One more than the highest normal UDateRelativeUnit value.
Base class for objects to which Unicode characters and strings can be appended.
@ UDAT_ABSOLUTE_HOUR
Hour.
@ UDAT_RELATIVE_WEEKS
Weeks.
UDisplayContext
Display context settings.
@ UDAT_ABSOLUTE_MONTH
Month.
@ UDAT_DIRECTION_LAST_2
Two before.
UDateAbsoluteUnit
Represents an absolute unit.
@ UDAT_DIRECTION_NEXT
Next.
@ UDAT_ABSOLUTE_UNIT_COUNT
One more than the highest normal UDateAbsoluteUnit value.
C API: Display context types (enum values)
C++ API: Locale ID object.
UDateRelativeDateTimeFormatterStyle
The formatting style.
UDateRelativeUnit
Represents the unit for formatting a relative date.
C++ API: Common ICU base class UObject.
@ U_INVALID_STATE_ERROR
Requested operation can not be completed with ICU in its current state.
A Locale object represents a specific geographical, political, or cultural region.
Represents a span of a string containing a given field.
@ UDAT_DIRECTION_NEXT_2
Two after.
@ UDAT_ABSOLUTE_THURSDAY
Thursday.