15 #if !UCONFIG_NO_FORMATTING 204 #define UDAT_YEAR "y" 209 #define UDAT_QUARTER "QQQQ" 214 #define UDAT_ABBR_QUARTER "QQQ" 219 #define UDAT_YEAR_QUARTER "yQQQQ" 224 #define UDAT_YEAR_ABBR_QUARTER "yQQQ" 229 #define UDAT_MONTH "MMMM" 234 #define UDAT_ABBR_MONTH "MMM" 239 #define UDAT_NUM_MONTH "M" 244 #define UDAT_YEAR_MONTH "yMMMM" 249 #define UDAT_YEAR_ABBR_MONTH "yMMM" 254 #define UDAT_YEAR_NUM_MONTH "yM" 265 #define UDAT_YEAR_MONTH_DAY "yMMMMd" 271 #define UDAT_YEAR_ABBR_MONTH_DAY "yMMMd" 277 #define UDAT_YEAR_NUM_MONTH_DAY "yMd" 282 #define UDAT_WEEKDAY "EEEE" 287 #define UDAT_ABBR_WEEKDAY "E" 293 #define UDAT_YEAR_MONTH_WEEKDAY_DAY "yMMMMEEEEd" 299 #define UDAT_YEAR_ABBR_MONTH_WEEKDAY_DAY "yMMMEd" 305 #define UDAT_YEAR_NUM_MONTH_WEEKDAY_DAY "yMEd" 311 #define UDAT_MONTH_DAY "MMMMd" 317 #define UDAT_ABBR_MONTH_DAY "MMMd" 323 #define UDAT_NUM_MONTH_DAY "Md" 329 #define UDAT_MONTH_WEEKDAY_DAY "MMMMEEEEd" 335 #define UDAT_ABBR_MONTH_WEEKDAY_DAY "MMMEd" 341 #define UDAT_NUM_MONTH_WEEKDAY_DAY "MEd" 349 #define UDAT_HOUR "j" 354 #define UDAT_HOUR24 "H" 359 #define UDAT_MINUTE "m" 365 #define UDAT_HOUR_MINUTE "jm" 371 #define UDAT_HOUR24_MINUTE "Hm" 376 #define UDAT_SECOND "s" 383 #define UDAT_HOUR_MINUTE_SECOND "jms" 390 #define UDAT_HOUR24_MINUTE_SECOND "Hms" 396 #define UDAT_MINUTE_SECOND "ms" 407 #define UDAT_LOCATION_TZ "VVVV" 415 #define UDAT_GENERIC_TZ "vvvv" 423 #define UDAT_ABBR_GENERIC_TZ "v" 431 #define UDAT_SPECIFIC_TZ "zzzz" 439 #define UDAT_ABBR_SPECIFIC_TZ "z" 447 #define UDAT_ABBR_UTC_TZ "ZZZZ" 451 #ifndef U_HIDE_DEPRECATED_API 456 #define UDAT_STANDALONE_MONTH "LLLL" 461 #define UDAT_ABBR_STANDALONE_MONTH "LLL" 467 #define UDAT_HOUR_MINUTE_GENERIC_TZ "jmv" 472 #define UDAT_HOUR_MINUTE_TZ "jmz" 477 #define UDAT_HOUR_GENERIC_TZ "jv" 482 #define UDAT_HOUR_TZ "jz" 485 #ifndef U_HIDE_INTERNAL_API 491 #define JP_ERA_2019_ROOT "Reiwa" 497 #define JP_ERA_2019_JA "\\u4EE4\\u548C" 503 #define JP_ERA_2019_NARROW "R" 504 #endif // U_HIDE_INTERNAL_API 778 #ifndef U_HIDE_INTERNAL_API 799 UDAT_FLEXIBLE_DAY_PERIOD_FIELD = 36,
801 #ifndef U_HIDE_INTERNAL_API 811 #ifndef U_HIDE_DEPRECATED_API 823 #ifndef U_HIDE_INTERNAL_API 829 #define UDAT_HAS_PATTERN_CHAR_FOR_TIME_SEPARATOR 0 879 const UChar *pattern,
880 int32_t patternLength,
961 #if U_SHOW_CPLUSPLUS_API 1014 int32_t resultLength,
1079 int32_t resultLength,
1274 const UChar* fields,
1313 U_CAPI const char* U_EXPORT2
1372 int32_t resultLength,
1388 const UChar *pattern,
1389 int32_t patternLength);
1421 UDAT_STANDALONE_SHORT_MONTHS,
1422 UDAT_STANDALONE_NARROW_MONTHS,
1438 UDAT_STANDALONE_SHORT_QUARTERS,
1514 int32_t symbolIndex,
1516 int32_t resultLength,
1553 int32_t symbolIndex,
1555 int32_t valueLength,
1567 U_CAPI const char* U_EXPORT2
1595 #ifndef U_HIDE_INTERNAL_API 1610 int32_t resultLength,
1627 int32_t resultLength,
1644 const UChar *datePattern,
1645 int32_t datePatternLength,
1646 const UChar *timePattern,
1647 int32_t timePatternLength,
1659 const UChar *pattern,
1660 int32_t patternLength,
U_CAPI void udat_setContext(UDateFormat *fmt, UDisplayContext value, UErrorCode *status)
Set a particular UDisplayContext value in the formatter, such as UDISPCTX_CAPITALIZATION_FOR_STANDALO...
void * UCalendar
A calendar.
FieldPosition and UFieldPosition selector for 'w' field alignment, corresponding to the UCAL_WEEK_OF_...
FieldPosition selector for 'b' field alignment.
U_CAPI int32_t udat_formatForFields(const UDateFormat *format, UDate dateToFormat, UChar *result, int32_t resultLength, UFieldPositionIterator *fpositer, UErrorCode *status)
Format a date using a UDateFormat.
U_CAPI UDate udat_parse(const UDateFormat *format, const UChar *text, int32_t textLength, int32_t *parsePos, UErrorCode *status)
Parse a string into an date/time using a UDateFormat.
FieldPosition and UFieldPosition selector for 'e' field alignment, corresponding to the UCAL_DOW_LOCA...
The CLDR-style short weekday names, e.g.
U_CAPI void udat_applyPattern(UDateFormat *format, UBool localized, const UChar *pattern, int32_t patternLength)
Set the pattern used by an UDateFormat.
Standalone context versions of months.
UCalendarDateFields
Possible fields in a UCalendar.
U_CAPI int32_t udat_formatCalendarForFields(const UDateFormat *format, UCalendar *calendar, UChar *result, int32_t capacity, UFieldPositionIterator *fpositer, UErrorCode *status)
Format a date using a UDateFormat.
indicates tolerance of a partial literal match e.g.
The localized characters.
FieldPosition and UFieldPosition selector for 'V' field alignment, corresponding to the UCAL_ZONE_OFF...
The CLDR-style format "narrow" weekday names, for example "M".
#define U_CAPI
This is used to declare a function as a public ICU C API.
FieldPosition selector for "Q" field alignment, corresponding to quarters.
U_CAPI UDateFormat * udat_open(UDateFormatStyle timeStyle, UDateFormatStyle dateStyle, const char *locale, const UChar *tzID, int32_t tzIDLength, const UChar *pattern, int32_t patternLength, UErrorCode *status)
Open a new UDateFormat for formatting and parsing dates and times.
FieldPosition and UFieldPosition selector for 'M' field alignment, corresponding to the UCAL_MONTH fi...
U_CAPI const char * udat_getLocaleByType(const UDateFormat *fmt, ULocDataLocaleType type, UErrorCode *status)
Get the locale for this date format object.
U_CAPI int32_t udat_countSymbols(const UDateFormat *fmt, UDateFormatSymbolType type)
Count the number of particular symbols for an UDateFormat.
FieldPosition and UFieldPosition selector for 'k' field alignment, corresponding to the UCAL_HOUR_OF_...
The long era names, for example Anno Domini.
void udat_applyPatternRelative(UDateFormat *format, const UChar *datePattern, int32_t datePatternLength, const UChar *timePattern, int32_t timePatternLength, UErrorCode *status)
Set the date & time patterns used by a UDateFormat set for relative date formatting.
Calendar zodiac names (only supported for some calendars, and only for FORMAT usage; udat_setSymbols ...
The quarters, for example 1st Quarter.
void udat_registerOpener(UDateFormatOpener opener, UErrorCode *status)
Register a provider factory.
UDisplayContext
Display context settings.
double UDate
Date and Time data type.
The CLDR-style stand-alone "wide" weekday names.
U_CAPI int32_t udat_getSymbols(const UDateFormat *fmt, UDateFormatSymbolType type, int32_t symbolIndex, UChar *result, int32_t resultLength, UErrorCode *status)
Get the symbols associated with an UDateFormat.
FieldPosition selector for 'X' field alignment, corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OF...
struct UFieldPositionIterator UFieldPositionIterator
C typedef for struct UFieldPositionIterator.
The short month names, for example Feb.
#define U_INTERNAL
This is used to declare a function as an internal ICU C API.
U_CAPI const UCalendar * udat_getCalendar(const UDateFormat *fmt)
Get the UCalendar associated with an UDateFormat.
U_CAPI int32_t udat_countAvailable(void)
Determine how many locales have date/time formatting patterns available.
Use the pattern given in the parameter to udat_open.
One more than the highest normal UDateFormatBooleanAttribute value.
#define U_HIDE_INTERNAL_API
Define this to 1 to request that internal API be "hidden".
C API: Display context types (enum values)
FieldPosition and UFieldPosition selector for 'g' field alignment, corresponding to the UCAL_JULIAN_D...
indicates tolerance of numeric data when String data may be assumed.
Bitfield for relative date.
FieldPosition and UFieldPosition selector for 'D' field alignment, corresponding to the UCAL_DAY_OF_Y...
FieldPosition selector for the "q" field alignment, corresponding to stand-alone quarters.
FieldPosition and UFieldPosition selector for 'u' field alignment, corresponding to the UCAL_EXTENDED...
FieldPosition and UFieldPosition selector for 'r' field alignment, no directly corresponding UCAL_ fi...
FieldPosition selector for 'c' field alignment, corresponding to the UCAL_DOW_LOCAL field...
FieldPosition and UFieldPosition selector for 'd' field alignment, corresponding to the UCAL_DATE fie...
indicates tolerance of pattern mismatch between input data and specified format pattern.
FieldPosition and UFieldPosition selector for time separator, no corresponding UCAL_ field...
FieldPosition and UFieldPosition selector for 'Y' field alignment, corresponding to the UCAL_YEAR_WOY...
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
UDateFormat *(* UDateFormatOpener)(UDateFormatStyle timeStyle, UDateFormatStyle dateStyle, const char *locale, const UChar *tzID, int32_t tzIDLength, const UChar *pattern, int32_t patternLength, UErrorCode *status)
FieldPosition and UFieldPosition selector for 'F' field alignment, corresponding to the UCAL_DAY_OF_W...
UDateFormatSymbolType
The possible types of date format symbols.
The CLDR-style stand-alone "narrow" weekday names.
U_CAPI void udat_setNumberFormat(UDateFormat *fmt, const UNumberFormat *numberFormatToSet)
Set the UNumberFormat associated with an UDateFormat.
The month names, for example February.
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
void * UNumberFormat
A number formatter.
A struct representing a range of text containing a specific field.
FieldPosition selector for 'O' field alignment, corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OF...
FieldPosition and UFieldPosition selector for 'A' field alignment, corresponding to the UCAL_MILLISEC...
indicates whether whitespace is allowed.
U_CAPI UCalendarDateFields udat_toCalendarDateField(UDateFormatField field)
Maps from a UDateFormatField to the corresponding UCalendarDateFields.
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
U_CAPI void udat_adoptNumberFormat(UDateFormat *fmt, UNumberFormat *numberFormatToAdopt)
Adopt the UNumberFormat associated with an UDateFormat.
U_CAPI const char * udat_getAvailable(int32_t localeIndex)
Get a locale for which date/time formatting patterns are available.
void * UDateFormat
A date formatter.
int32_t udat_toPatternRelativeDate(const UDateFormat *fmt, UChar *result, int32_t resultLength, UErrorCode *status)
Extract the date pattern from a UDateFormat set for relative date formatting.
U_CAPI int32_t udat_toPattern(const UDateFormat *fmt, UBool localized, UChar *result, int32_t resultLength, UErrorCode *status)
Extract the pattern from a UDateFormat.
FieldPosition and UFieldPosition selector for 'v' field alignment, corresponding to the UCAL_ZONE_OFF...
U_CAPI UBool udat_isLenient(const UDateFormat *fmt)
Determine if an UDateFormat will perform lenient parsing.
The era names, for example AD.
Cyclic year names (only supported for some calendars, and only for FORMAT usage; udat_setSymbols not ...
FieldPosition and UFieldPosition selector for 'W' field alignment, corresponding to the UCAL_WEEK_OF_...
The CLDR-style format "wide" weekday names, for example Monday.
struct UDateFormatSymbols UDateFormatSymbols
Date format symbols.
UDateFormatStyle
The possible date/time format styles.
Calendar zodiac names (only supported for some calendars, and only for FORMAT usage; udat_setSymbols ...
FieldPosition and UFieldPosition selector for 'E' field alignment, corresponding to the UCAL_DAY_OF_W...
FieldPosition and UFieldPosition selector for 'a' field alignment, corresponding to the UCAL_AM_PM fi...
The short quarter names, for example Q1.
Cyclic year names (only supported for some calendars, and only for FORMAT usage; udat_setSymbols not ...
FieldPosition and UFieldPosition selector for 'K' field alignment, corresponding to the UCAL_HOUR fie...
U_CAPI void udat_setSymbols(UDateFormat *format, UDateFormatSymbolType type, int32_t symbolIndex, UChar *value, int32_t valueLength, UErrorCode *status)
Set the symbols associated with an UDateFormat.
uint16_t UChar
The base type for UTF-16 code units and pointers.
U_CAPI void udat_setLenient(UDateFormat *fmt, UBool isLenient)
Specify whether an UDateFormat will perform lenient parsing.
U_CAPI UDate udat_get2DigitYearStart(const UDateFormat *fmt, UErrorCode *status)
Get the year relative to which all 2-digit years are interpreted.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
UDisplayContextType
Display context types, for getting values of a particular setting.
Standalone context versions of quarters.
UDateFormatField
FieldPosition and UFieldPosition selectors for format fields defined by DateFormat and UDateFormat...
FieldPosition and UFieldPosition selector for 'G' field alignment, corresponding to the UCAL_ERA fiel...
U_CAPI void udat_parseCalendar(const UDateFormat *format, UCalendar *calendar, const UChar *text, int32_t textLength, int32_t *parsePos, UErrorCode *status)
Parse a string into an date/time using a UDateFormat.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
ULocDataLocaleType
Constants for *_getLocale() Allow user to select whether she wants information on requested...
U_CAPI void udat_adoptNumberFormatForFields(UDateFormat *fmt, const UChar *fields, UNumberFormat *numberFormatToSet, UErrorCode *status)
Set the UNumberFormat for specific field associated with an UDateFormat.
FieldPosition and UFieldPosition selector for 'm' field alignment, corresponding to the UCAL_MINUTE f...
U_CAPI int32_t udat_format(const UDateFormat *format, UDate dateToFormat, UChar *result, int32_t resultLength, UFieldPosition *position, UErrorCode *status)
Format a date using a UDateFormat.
U_CAPI UDateFormat * udat_clone(const UDateFormat *fmt, UErrorCode *status)
Open a copy of a UDateFormat.
The CLDR-style stand-alone "abbreviated" (not "short") weekday names.
The narrow month names, for example F.
Cyclic year names (only supported for some calendars, and only for FORMAT usage)
U_CAPI UDisplayContext udat_getContext(const UDateFormat *fmt, UDisplayContextType type, UErrorCode *status)
Get the formatter's UDisplayContext value for the specified UDisplayContextType, such as UDISPCTX_TYP...
FieldPosition selector for 'x' field alignment, corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OF...
U_CAPI int32_t udat_formatCalendar(const UDateFormat *format, UCalendar *calendar, UChar *result, int32_t capacity, UFieldPosition *position, UErrorCode *status)
Format a date using an UDateFormat.
C API: UFieldPositionIterator for use with format APIs.
FieldPosition and UFieldPosition selector for 's' field alignment, corresponding to the UCAL_SECOND f...
Basic definitions for ICU, for both C and C++ APIs.
The CLDR-style format "abbreviated" (not "short") weekday names, for example "Mon." For the CLDR-style format "short" weekday names, use UDAT_SHORTER_WEEKDAYS.
U_CAPI void udat_close(UDateFormat *format)
Close a UDateFormat.
FieldPosition and UFieldPosition selector for 'z' field alignment, corresponding to the UCAL_ZONE_OFF...
FieldPosition and UFieldPosition selector for 'y' field alignment, corresponding to the UCAL_YEAR fie...
FieldPosition selector for 'L' field alignment, corresponding to the UCAL_MONTH field.
The AM/PM names, for example AM.
U_CAPI const UNumberFormat * udat_getNumberFormat(const UDateFormat *fmt)
Get the UNumberFormat associated with an UDateFormat.
Number of FieldPosition and UFieldPosition selectors for DateFormat and UDateFormat.
int32_t udat_toPatternRelativeTime(const UDateFormat *fmt, UChar *result, int32_t resultLength, UErrorCode *status)
Extract the time pattern from a UDateFormat set for relative date formatting.
FieldPosition and UFieldPosition selector for 'Z' field alignment, corresponding to the UCAL_ZONE_OFF...
FieldPosition and UFieldPosition selector for 'H' field alignment, corresponding to the UCAL_HOUR_OF_...
U_CAPI UBool udat_getBooleanAttribute(const UDateFormat *fmt, UDateFormatBooleanAttribute attr, UErrorCode *status)
Get a boolean attribute associated with a UDateFormat.
UDateFormatBooleanAttribute
DateFormat boolean attributes.
U_CAPI const UNumberFormat * udat_getNumberFormatForField(const UDateFormat *fmt, UChar field)
Get the UNumberFormat for specific field associated with an UDateFormat.
FieldPosition and UFieldPosition selector for 'S' field alignment, corresponding to the UCAL_MILLISEC...
FieldPosition and UFieldPosition selector for 'h' field alignment, corresponding to the UCAL_HOUR fie...
Calendar zodiac names (only supported for some calendars, and only for FORMAT usage) ...
UDateFormatOpener udat_unregisterOpener(UDateFormatOpener opener, UErrorCode *status)
Un-Register a provider factory.
FieldPosition selector for "U" field alignment, corresponding to cyclic year names.
U_CAPI void udat_setBooleanAttribute(UDateFormat *fmt, UDateFormatBooleanAttribute attr, UBool newValue, UErrorCode *status)
Set a boolean attribute associated with a UDateFormat.
U_CAPI void udat_set2DigitYearStart(UDateFormat *fmt, UDate d, UErrorCode *status)
Set the year relative to which all 2-digit years will be interpreted.
int8_t UBool
The ICU boolean type.
C API: Compatibility APIs for number formatting.
U_CAPI void udat_setCalendar(UDateFormat *fmt, const UCalendar *calendarToSet)
Set the UCalendar associated with an UDateFormat.
Standalone version of UDAT_SHORTER_WEEKDAYS.