Go to the documentation of this file.
26 #if !UCONFIG_NO_FORMATTING
44 class DateTimePatternGenerator;
48 #if U_PF_WINDOWS <= U_PLATFORM && U_PLATFORM <= U_PF_CYGWIN
169 kDateOffset = kShort + 1,
178 kDateTimeOffset = kDateTime + 1,
185 kRelative = (1 << 7),
187 kFullRelative = (kFull | kRelative),
189 kLongRelative = kLong | kRelative,
191 kMediumRelative = kMedium | kRelative,
193 kShortRelative = kShort | kRelative,
209 DATE_OFFSET = kDateOffset,
211 DATE_TIME = kDateTime
521 static DateFormat* U_EXPORT2 createInstance(
void);
534 static DateFormat* U_EXPORT2 createTimeInstance(EStyle style = kDefault,
535 const Locale& aLocale = Locale::getDefault());
552 static DateFormat* U_EXPORT2 createDateInstance(EStyle style = kDefault,
553 const Locale& aLocale = Locale::getDefault());
573 static DateFormat* U_EXPORT2 createDateTimeInstance(EStyle dateStyle = kDefault,
574 EStyle timeStyle = kDefault,
575 const Locale& aLocale = Locale::getDefault());
577 #ifndef U_HIDE_INTERNAL_API
605 static DateFormat* U_EXPORT2 createInstanceForSkeleton(
622 static DateFormat* U_EXPORT2 createInstanceForSkeleton(
641 static DateFormat* U_EXPORT2 createInstanceForSkeleton(
655 static const Locale* U_EXPORT2 getAvailableLocales(int32_t& count);
662 virtual UBool isLenient(
void)
const;
684 virtual void setLenient(
UBool lenient);
691 virtual UBool isCalendarLenient(
void)
const;
703 virtual void setCalendarLenient(
UBool lenient);
714 virtual const Calendar* getCalendar(
void)
const;
725 virtual void adoptCalendar(
Calendar* calendarToAdopt);
734 virtual void setCalendar(
const Calendar& newCalendar);
743 virtual const NumberFormat* getNumberFormat(
void)
const;
751 virtual void adoptNumberFormat(
NumberFormat* formatToAdopt);
758 virtual void setNumberFormat(
const NumberFormat& newNumberFormat);
765 virtual const TimeZone& getTimeZone(
void)
const;
773 virtual void adoptTimeZone(
TimeZone* zoneToAdopt);
780 virtual void setTimeZone(
const TimeZone& zone);
889 friend class DateFmtKeyByStyle;
892 #ifndef U_HIDE_OBSOLETE_API
@ UDAT_HOUR_OF_DAY1_FIELD
FieldPosition and UFieldPosition selector for 'k' field alignment, corresponding to the UCAL_HOUR_OF_...
@ UDAT_MINUTE_FIELD
FieldPosition and UFieldPosition selector for 'm' field alignment, corresponding to the UCAL_MINUTE f...
FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...
@ UDAT_JULIAN_DAY_FIELD
FieldPosition and UFieldPosition selector for 'g' field alignment, corresponding to the UCAL_JULIAN_D...
Basic definitions for ICU, for both C and C++ APIs.
@ UDAT_FRACTIONAL_SECOND_FIELD
FieldPosition and UFieldPosition selector for 'S' field alignment, corresponding to the UCAL_MILLISEC...
@ UDAT_TIMEZONE_FIELD
FieldPosition and UFieldPosition selector for 'z' field alignment, corresponding to the UCAL_ZONE_OFF...
Calendar is an abstract base class for converting between a UDate object and a set of integer fields ...
@ UDAT_DATE_FIELD
FieldPosition and UFieldPosition selector for 'd' field alignment, corresponding to the UCAL_DATE fie...
int8_t UBool
The ICU boolean type.
FieldPositionIterator returns the field ids and their start/limit positions generated by a call to Fo...
@ UDAT_YEAR_WOY_FIELD
FieldPosition and UFieldPosition selector for 'Y' field alignment, corresponding to the UCAL_YEAR_WOY...
@ UDAT_DAY_OF_YEAR_FIELD
FieldPosition and UFieldPosition selector for 'D' field alignment, corresponding to the UCAL_DAY_OF_Y...
@ UDAT_DOW_LOCAL_FIELD
FieldPosition and UFieldPosition selector for 'e' field alignment, corresponding to the UCAL_DOW_LOCA...
@ UDAT_EXTENDED_YEAR_FIELD
FieldPosition and UFieldPosition selector for 'u' field alignment, corresponding to the UCAL_EXTENDED...
@ UDAT_HOUR1_FIELD
FieldPosition and UFieldPosition selector for 'h' field alignment, corresponding to the UCAL_HOUR fie...
UDateFormatBooleanAttribute
DateFormat boolean attributes.
TimeZone represents a time zone offset, and also figures out daylight savings.
UDisplayContextType
Display context types, for getting values of a particular setting.
@ UDAT_MILLISECONDS_IN_DAY_FIELD
FieldPosition and UFieldPosition selector for 'A' field alignment, corresponding to the UCAL_MILLISEC...
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
@ UDAT_DAY_OF_WEEK_FIELD
FieldPosition and UFieldPosition selector for 'E' field alignment, corresponding to the UCAL_DAY_OF_W...
C++: internal template EnumSet<>
@ UDAT_HOUR0_FIELD
FieldPosition and UFieldPosition selector for 'K' field alignment, corresponding to the UCAL_HOUR fie...
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
@ UDAT_BOOLEAN_ATTRIBUTE_COUNT
One more than the highest normal UDateFormatBooleanAttribute value.
@ UDAT_DAY_OF_WEEK_IN_MONTH_FIELD
FieldPosition and UFieldPosition selector for 'F' field alignment, corresponding to the UCAL_DAY_OF_W...
@ UDAT_YEAR_FIELD
FieldPosition and UFieldPosition selector for 'y' field alignment, corresponding to the UCAL_YEAR fie...
C++ API: Calendar object.
@ UDAT_SECOND_FIELD
FieldPosition and UFieldPosition selector for 's' field alignment, corresponding to the UCAL_SECOND f...
double UDate
Date and Time data type.
@ UDAT_WEEK_OF_YEAR_FIELD
FieldPosition and UFieldPosition selector for 'w' field alignment, corresponding to the UCAL_WEEK_OF_...
@ UDAT_HOUR_OF_DAY0_FIELD
FieldPosition and UFieldPosition selector for 'H' field alignment, corresponding to the UCAL_HOUR_OF_...
UDisplayContext
Display context settings.
C++ API: Compatibility APIs for number formatting.
C API: Display context types (enum values)
@ UDAT_WEEK_OF_MONTH_FIELD
FieldPosition and UFieldPosition selector for 'W' field alignment, corresponding to the UCAL_WEEK_OF_...
C++ API: Locale ID object.
@ UDAT_ERA_FIELD
FieldPosition and UFieldPosition selector for 'G' field alignment, corresponding to the UCAL_ERA fiel...
ParsePosition is a simple class used by Format and its subclasses to keep track of the current positi...
#define U_NAMESPACE_BEGIN
@ UDAT_AM_PM_FIELD
FieldPosition and UFieldPosition selector for 'a' field alignment, corresponding to the UCAL_AM_PM fi...
A Locale object represents a specific geographical, political, or cultural region.
@ UDAT_MONTH_FIELD
FieldPosition and UFieldPosition selector for 'M' field alignment, corresponding to the UCAL_MONTH fi...