ICU 54.1  54.1
udat.h
Go to the documentation of this file.
1 /*
2  *******************************************************************************
3  * Copyright (C) 1996-2014, International Business Machines
4  * Corporation and others. All Rights Reserved.
5  *******************************************************************************
6 */
7 
8 #ifndef UDAT_H
9 #define UDAT_H
10 
11 #include "unicode/utypes.h"
12 
13 #if !UCONFIG_NO_FORMATTING
14 
15 #include "unicode/localpointer.h"
16 #include "unicode/ucal.h"
17 #include "unicode/unum.h"
150 typedef void* UDateFormat;
151 
155 typedef enum UDateFormatStyle {
166 
168  UDAT_RELATIVE = (1 << 7),
169 
170  UDAT_FULL_RELATIVE = UDAT_FULL | UDAT_RELATIVE,
171 
172  UDAT_LONG_RELATIVE = UDAT_LONG | UDAT_RELATIVE,
173 
174  UDAT_MEDIUM_RELATIVE = UDAT_MEDIUM | UDAT_RELATIVE,
175 
176  UDAT_SHORT_RELATIVE = UDAT_SHORT | UDAT_RELATIVE,
177 
178 
180  UDAT_NONE = -1,
181 
188 
189 #ifndef U_HIDE_INTERNAL_API
192 #endif /* U_HIDE_INTERNAL_API */
194 
195 /* Skeletons for dates. */
196 
201 #define UDAT_YEAR "y"
202 
206 #define UDAT_QUARTER "QQQQ"
207 
211 #define UDAT_ABBR_QUARTER "QQQ"
212 
216 #define UDAT_YEAR_QUARTER "yQQQQ"
217 
221 #define UDAT_YEAR_ABBR_QUARTER "yQQQ"
222 
226 #define UDAT_MONTH "MMMM"
227 
231 #define UDAT_ABBR_MONTH "MMM"
232 
236 #define UDAT_NUM_MONTH "M"
237 
241 #define UDAT_YEAR_MONTH "yMMMM"
242 
246 #define UDAT_YEAR_ABBR_MONTH "yMMM"
247 
251 #define UDAT_YEAR_NUM_MONTH "yM"
252 
256 #define UDAT_DAY "d"
257 
262 #define UDAT_YEAR_MONTH_DAY "yMMMMd"
263 
268 #define UDAT_YEAR_ABBR_MONTH_DAY "yMMMd"
269 
274 #define UDAT_YEAR_NUM_MONTH_DAY "yMd"
275 
279 #define UDAT_WEEKDAY "EEEE"
280 
284 #define UDAT_ABBR_WEEKDAY "E"
285 
290 #define UDAT_YEAR_MONTH_WEEKDAY_DAY "yMMMMEEEEd"
291 
296 #define UDAT_YEAR_ABBR_MONTH_WEEKDAY_DAY "yMMMEd"
297 
302 #define UDAT_YEAR_NUM_MONTH_WEEKDAY_DAY "yMEd"
303 
308 #define UDAT_MONTH_DAY "MMMMd"
309 
314 #define UDAT_ABBR_MONTH_DAY "MMMd"
315 
320 #define UDAT_NUM_MONTH_DAY "Md"
321 
326 #define UDAT_MONTH_WEEKDAY_DAY "MMMMEEEEd"
327 
332 #define UDAT_ABBR_MONTH_WEEKDAY_DAY "MMMEd"
333 
338 #define UDAT_NUM_MONTH_WEEKDAY_DAY "MEd"
339 
340 /* Skeletons for times. */
341 
346 #define UDAT_HOUR "j"
347 
351 #define UDAT_HOUR24 "H"
352 
356 #define UDAT_MINUTE "m"
357 
362 #define UDAT_HOUR_MINUTE "jm"
363 
368 #define UDAT_HOUR24_MINUTE "Hm"
369 
373 #define UDAT_SECOND "s"
374 
380 #define UDAT_HOUR_MINUTE_SECOND "jms"
381 
387 #define UDAT_HOUR24_MINUTE_SECOND "Hms"
388 
393 #define UDAT_MINUTE_SECOND "ms"
394 
395 /* Skeletons for time zones. */
396 
404 #define UDAT_LOCATION_TZ "VVVV"
405 
412 #define UDAT_GENERIC_TZ "vvvv"
413 
420 #define UDAT_ABBR_GENERIC_TZ "v"
421 
428 #define UDAT_SPECIFIC_TZ "zzzz"
429 
436 #define UDAT_ABBR_SPECIFIC_TZ "z"
437 
444 #define UDAT_ABBR_UTC_TZ "ZZZZ"
445 
446 /* deprecated skeleton constants */
447 
448 #ifndef U_HIDE_DEPRECATED_API
449 
453 #define UDAT_STANDALONE_MONTH "LLLL"
454 
458 #define UDAT_ABBR_STANDALONE_MONTH "LLL"
459 
464 #define UDAT_HOUR_MINUTE_GENERIC_TZ "jmv"
465 
469 #define UDAT_HOUR_MINUTE_TZ "jmz"
470 
474 #define UDAT_HOUR_GENERIC_TZ "jv"
475 
479 #define UDAT_HOUR_TZ "jz"
480 #endif /* U_HIDE_DEPRECATED_API */
481 
487 typedef enum UDateFormatField {
494 
501 
508 
515 
524 
533 
540 
547 
562 
569 
576 
583 
590 
597 
604 
613 
622 
630 
637 
644 
651 
658 
665 
673 
687 
695 
704 
713 
720 
729 
737 
745 
753 
754 #ifndef U_HIDE_INTERNAL_API
755 
761 #endif /* U_HIDE_INTERNAL_API */
762 
772 
774 
775 
786 
787 
816 U_STABLE UDateFormat* U_EXPORT2
817 udat_open(UDateFormatStyle timeStyle,
818  UDateFormatStyle dateStyle,
819  const char *locale,
820  const UChar *tzID,
821  int32_t tzIDLength,
822  const UChar *pattern,
823  int32_t patternLength,
824  UErrorCode *status);
825 
826 
833 U_STABLE void U_EXPORT2
834 udat_close(UDateFormat* format);
835 
836 
837 /* Dont hide UDateFormatBooleanAttribute type with #ifndef U_HIDE_DRAFT_API, needed by virtual methods */
838 /* Also don't hide UDAT_BOOLEAN_ATTRIBUTE_COUNT, needed by template class EnumSet<UDateFormatBooleanAttribute,...> */
845 #ifndef U_HIDE_DRAFT_API
846 
868 #endif /* U_HIDE_DRAFT_API */
869 
875 
876 #ifndef U_HIDE_DRAFT_API
877 
887 U_DRAFT UBool U_EXPORT2
889 
900 U_DRAFT void U_EXPORT2
902 
903 #endif /* U_HIDE_DRAFT_API */
904 
905 
906 
907 #if U_SHOW_CPLUSPLUS_API
908 
910 
921 
923 
924 #endif
925 
934 U_STABLE UDateFormat* U_EXPORT2
935 udat_clone(const UDateFormat *fmt,
936  UErrorCode *status);
937 
956 U_STABLE int32_t U_EXPORT2
957 udat_format( const UDateFormat* format,
958  UDate dateToFormat,
959  UChar* result,
960  int32_t resultLength,
961  UFieldPosition* position,
962  UErrorCode* status);
963 
989 U_STABLE UDate U_EXPORT2
990 udat_parse(const UDateFormat* format,
991  const UChar* text,
992  int32_t textLength,
993  int32_t *parsePos,
994  UErrorCode *status);
995 
1017 U_STABLE void U_EXPORT2
1018 udat_parseCalendar(const UDateFormat* format,
1019  UCalendar* calendar,
1020  const UChar* text,
1021  int32_t textLength,
1022  int32_t *parsePos,
1023  UErrorCode *status);
1024 
1034 U_STABLE UBool U_EXPORT2
1035 udat_isLenient(const UDateFormat* fmt);
1036 
1046 U_STABLE void U_EXPORT2
1048  UBool isLenient);
1049 
1059 U_STABLE const UCalendar* U_EXPORT2
1060 udat_getCalendar(const UDateFormat* fmt);
1061 
1071 U_STABLE void U_EXPORT2
1073  const UCalendar* calendarToSet);
1074 
1084 U_STABLE const UNumberFormat* U_EXPORT2
1085 udat_getNumberFormat(const UDateFormat* fmt);
1086 
1087 #ifndef U_HIDE_DRAFT_API
1088 
1097 U_DRAFT const UNumberFormat* U_EXPORT2
1099 
1115 U_DRAFT void U_EXPORT2
1117  const UChar* fields,
1118  UNumberFormat* numberFormatToSet,
1119  UErrorCode* status);
1120 #endif /* U_HIDE_DRAFT_API */
1121 
1134 U_STABLE void U_EXPORT2
1136  const UNumberFormat* numberFormatToSet);
1137 
1138 #ifndef U_HIDE_DRAFT_API
1139 
1148 U_DRAFT void U_EXPORT2
1150  UNumberFormat* numberFormatToAdopt);
1151 #endif /* U_HIDE_DRAFT_API */
1152 
1162 U_STABLE const char* U_EXPORT2
1163 udat_getAvailable(int32_t localeIndex);
1164 
1173 U_STABLE int32_t U_EXPORT2
1174 udat_countAvailable(void);
1175 
1186 U_STABLE UDate U_EXPORT2
1188  UErrorCode *status);
1189 
1200 U_STABLE void U_EXPORT2
1202  UDate d,
1203  UErrorCode *status);
1204 
1217 U_STABLE int32_t U_EXPORT2
1218 udat_toPattern( const UDateFormat *fmt,
1219  UBool localized,
1220  UChar *result,
1221  int32_t resultLength,
1222  UErrorCode *status);
1223 
1234 U_STABLE void U_EXPORT2
1236  UBool localized,
1237  const UChar *pattern,
1238  int32_t patternLength);
1239 
1270  UDAT_STANDALONE_SHORT_MONTHS,
1271  UDAT_STANDALONE_NARROW_MONTHS,
1287  UDAT_STANDALONE_SHORT_QUARTERS,
1301 #ifndef U_HIDE_DRAFT_API
1302  ,
1337 #endif /* U_HIDE_DRAFT_API */
1339 
1340 struct UDateFormatSymbols;
1346 
1363 U_STABLE int32_t U_EXPORT2
1364 udat_getSymbols(const UDateFormat *fmt,
1365  UDateFormatSymbolType type,
1366  int32_t symbolIndex,
1367  UChar *result,
1368  int32_t resultLength,
1369  UErrorCode *status);
1370 
1383 U_STABLE int32_t U_EXPORT2
1384 udat_countSymbols( const UDateFormat *fmt,
1385  UDateFormatSymbolType type);
1386 
1402 U_STABLE void U_EXPORT2
1403 udat_setSymbols( UDateFormat *format,
1404  UDateFormatSymbolType type,
1405  int32_t symbolIndex,
1406  UChar *value,
1407  int32_t valueLength,
1408  UErrorCode *status);
1409 
1419 U_STABLE const char* U_EXPORT2
1421  ULocDataLocaleType type,
1422  UErrorCode* status);
1423 
1432 U_DRAFT void U_EXPORT2
1434 
1435 #ifndef U_HIDE_DRAFT_API
1436 
1445 U_DRAFT UDisplayContext U_EXPORT2
1446 udat_getContext(const UDateFormat* fmt, UDisplayContextType type, UErrorCode* status);
1447 
1448 #endif /* U_HIDE_DRAFT_API */
1449 
1450 #ifndef U_HIDE_INTERNAL_API
1451 
1462 U_INTERNAL int32_t U_EXPORT2
1464  UChar *result,
1465  int32_t resultLength,
1466  UErrorCode *status);
1467 
1479 U_INTERNAL int32_t U_EXPORT2
1481  UChar *result,
1482  int32_t resultLength,
1483  UErrorCode *status);
1484 
1497 U_INTERNAL void U_EXPORT2
1499  const UChar *datePattern,
1500  int32_t datePatternLength,
1501  const UChar *timePattern,
1502  int32_t timePatternLength,
1503  UErrorCode *status);
1504 
1509 typedef UDateFormat* (U_EXPORT2 *UDateFormatOpener) (UDateFormatStyle timeStyle,
1510  UDateFormatStyle dateStyle,
1511  const char *locale,
1512  const UChar *tzID,
1513  int32_t tzIDLength,
1514  const UChar *pattern,
1515  int32_t patternLength,
1516  UErrorCode *status);
1517 
1522 U_INTERNAL void U_EXPORT2
1524 
1529 U_INTERNAL UDateFormatOpener U_EXPORT2
1531 #endif /* U_HIDE_INTERNAL_API */
1532 
1533 
1534 #endif /* #if !UCONFIG_NO_FORMATTING */
1535 
1536 #endif
int32_t udat_format(const UDateFormat *format, UDate dateToFormat, UChar *result, int32_t resultLength, UFieldPosition *position, UErrorCode *status)
Format a date using an UDateFormat.
void * UCalendar
A calendar.
Definition: ucal.h:153
FieldPosition and UFieldPosition selector for 'w' field alignment, corresponding to the UCAL_WEEK_OF_...
Definition: udat.h:589
FieldPosition and UFieldPosition selector for 'e' field alignment, corresponding to the UCAL_DOW_LOCA...
Definition: udat.h:643
The CLDR-style short weekday names, e.g.
Definition: udat.h:1295
Standalone context versions of months.
Definition: udat.h:1269
UCalendarDateFields
Possible fields in a UCalendar.
Definition: ucal.h:183
UBool udat_isLenient(const UDateFormat *fmt)
Determine if an UDateFormat will perform lenient parsing.
The localized characters.
Definition: udat.h:1261
FieldPosition and UFieldPosition selector for 'V' field alignment, corresponding to the UCAL_ZONE_OFF...
Definition: udat.h:719
The CLDR-style format "narrow" weekday names, for example "M".
Definition: udat.h:1267
FieldPosition selector for "Q" field alignment, corresponding to quarters.
Definition: udat.h:703
C API: Calendar.
const UNumberFormat * udat_getNumberFormatForField(const UDateFormat *fmt, UChar field)
Get the UNumberFormat for specific field associated with an UDateFormat.
FieldPosition and UFieldPosition selector for 'M' field alignment, corresponding to the UCAL_MONTH fi...
Definition: udat.h:507
void udat_adoptNumberFormat(UDateFormat *fmt, UNumberFormat *numberFormatToAdopt)
Adopt the UNumberFormat associated with an UDateFormat.
UBool udat_getBooleanAttribute(const UDateFormat *fmt, UDateFormatBooleanAttribute attr, UErrorCode *status)
Get a boolean attribute associated with a UDateFormat.
FieldPosition and UFieldPosition selector for 'k' field alignment, corresponding to the UCAL_HOUR_OF_...
Definition: udat.h:523
const char * udat_getLocaleByType(const UDateFormat *fmt, ULocDataLocaleType type, UErrorCode *status)
Get the locale for this date format object.
The long era names, for example Anno Domini.
Definition: udat.h:1263
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 ...
Definition: udat.h:1336
Short style.
Definition: udat.h:163
The quarters, for example 1st Quarter.
Definition: udat.h:1282
void udat_registerOpener(UDateFormatOpener opener, UErrorCode *status)
Register a provider factory.
UDisplayContext
Display context settings.
double UDate
Date and Time data type.
Definition: utypes.h:201
No style.
Definition: udat.h:180
The CLDR-style stand-alone "wide" weekday names.
Definition: udat.h:1273
Long style.
Definition: udat.h:159
FieldPosition selector for 'X' field alignment, corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OF...
Definition: udat.h:744
void udat_setCalendar(UDateFormat *fmt, const UCalendar *calendarToSet)
Set the UCalendar associated with an UDateFormat.
The short month names, for example Feb.
Definition: udat.h:1250
#define U_INTERNAL
This is used to declare a function as an internal ICU C API.
Definition: umachine.h:117
Use the pattern given in the parameter to udat_open.
Definition: udat.h:187
Default style.
Definition: udat.h:165
const UNumberFormat * udat_getNumberFormat(const UDateFormat *fmt)
Get the UNumberFormat associated with an UDateFormat.
count boolean date format constants
Definition: udat.h:873
void udat_setLenient(UDateFormat *fmt, UBool isLenient)
Specify whether an UDateFormat will perform lenient parsing.
#define U_HIDE_INTERNAL_API
Define this to 1 to request that internal API be "hidden".
Definition: utypes.h:85
C API: Display context types (enum values)
FieldPosition and UFieldPosition selector for 'g' field alignment, corresponding to the UCAL_JULIAN_D...
Definition: udat.h:657
const UCalendar * udat_getCalendar(const UDateFormat *fmt)
Get the UCalendar associated with an UDateFormat.
indicates tolerance of numeric data when String data may be assumed.
Definition: udat.h:856
Bitfield for relative date.
Definition: udat.h:168
FieldPosition and UFieldPosition selector for 'D' field alignment, corresponding to the UCAL_DAY_OF_Y...
Definition: udat.h:575
FieldPosition selector for the "q" field alignment, corresponding to stand-alone quarters.
Definition: udat.h:712
FieldPosition and UFieldPosition selector for 'u' field alignment, corresponding to the UCAL_EXTENDED...
Definition: udat.h:650
FieldPosition and UFieldPosition selector for 'r' field alignment, no directly corresponding UCAL_ fi...
Definition: udat.h:760
void udat_setSymbols(UDateFormat *format, UDateFormatSymbolType type, int32_t symbolIndex, UChar *value, int32_t valueLength, UErrorCode *status)
Set the symbols associated with an UDateFormat.
void udat_setNumberFormat(UDateFormat *fmt, const UNumberFormat *numberFormatToSet)
Set the UNumberFormat associated with an UDateFormat.
void udat_setContext(UDateFormat *fmt, UDisplayContext value, UErrorCode *status)
Set a particular UDisplayContext value in the formatter, such as UDISPCTX_CAPITALIZATION_FOR_STANDALO...
FieldPosition selector for 'c' field alignment, corresponding to the UCAL_DOW_LOCAL field...
Definition: udat.h:686
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 and UFieldPosition selector for 'd' field alignment, corresponding to the UCAL_DATE fie...
Definition: udat.h:514
void udat_close(UDateFormat *format)
Close a UDateFormat.
indicates tolerance of pattern mismatch between input data and specified format pattern.
Definition: udat.h:867
Full style.
Definition: udat.h:157
FieldPosition and UFieldPosition selector for 'Y' field alignment, corresponding to the UCAL_YEAR_WOY...
Definition: udat.h:636
void udat_set2DigitYearStart(UDateFormat *fmt, UDate d, UErrorCode *status)
Set the year relative to which all 2-digit years will be interpreted.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:129
UDateFormat *(* UDateFormatOpener)(UDateFormatStyle timeStyle, UDateFormatStyle dateStyle, const char *locale, const UChar *tzID, int32_t tzIDLength, const UChar *pattern, int32_t patternLength, UErrorCode *status)
Definition: udat.h:1509
FieldPosition and UFieldPosition selector for 'F' field alignment, corresponding to the UCAL_DAY_OF_W...
Definition: udat.h:582
UDateFormatSymbolType
The possible types of date format symbols.
Definition: udat.h:1244
The CLDR-style stand-alone "narrow" weekday names.
Definition: udat.h:1280
The month names, for example February.
Definition: udat.h:1248
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:290
void * UNumberFormat
A number formatter.
Definition: unum.h:134
A struct representing a range of text containing a specific field.
Definition: umisc.h:32
FieldPosition selector for 'O' field alignment, corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OF...
Definition: udat.h:736
FieldPosition and UFieldPosition selector for 'A' field alignment, corresponding to the UCAL_MILLISEC...
Definition: udat.h:664
indicates whether whitespace is allowed.
Definition: udat.h:850
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
void * UDateFormat
A date formatter.
Definition: udat.h:150
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.
FieldPosition and UFieldPosition selector for 'v' field alignment, corresponding to the UCAL_ZONE_OFF...
Definition: udat.h:679
The era names, for example AD.
Definition: udat.h:1246
Cyclic year names (only supported for some calendars, and only for FORMAT usage; udat_setSymbols not ...
Definition: udat.h:1308
FieldPosition and UFieldPosition selector for 'W' field alignment, corresponding to the UCAL_WEEK_OF_...
Definition: udat.h:596
The CLDR-style format "wide" weekday names, for example Monday.
Definition: udat.h:1252
UCalendarDateFields udat_toCalendarDateField(UDateFormatField field)
Maps from a UDateFormatField to the corresponding UCalendarDateFields.
struct UDateFormatSymbols UDateFormatSymbols
Date format symbols.
Definition: udat.h:1345
UDateFormatStyle
The possible date/time format styles.
Definition: udat.h:155
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.
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.
Calendar zodiac names (only supported for some calendars, and only for FORMAT usage; udat_setSymbols ...
Definition: udat.h:1325
void udat_applyPattern(UDateFormat *format, UBool localized, const UChar *pattern, int32_t patternLength)
Set the pattern used by an UDateFormat.
FieldPosition and UFieldPosition selector for 'E' field alignment, corresponding to the UCAL_DAY_OF_W...
Definition: udat.h:568
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 'a' field alignment, corresponding to the UCAL_AM_PM fi...
Definition: udat.h:603
"Smart pointer" class, closes a UDateFormat via udat_close().
The short quarter names, for example Q1.
Definition: udat.h:1284
Cyclic year names (only supported for some calendars, and only for FORMAT usage; udat_setSymbols not ...
Definition: udat.h:1319
FieldPosition and UFieldPosition selector for 'K' field alignment, corresponding to the UCAL_HOUR fie...
Definition: udat.h:621
const char * udat_getAvailable(int32_t localeIndex)
Get a locale for which date/time formatting patterns are available.
indicates tolerance of a partial literal match
Definition: udat.h:861
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.
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
Definition: umachine.h:312
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
UDisplayContextType
Display context types, for getting values of a particular setting.
void udat_adoptNumberFormatForFields(UDateFormat *fmt, const UChar *fields, UNumberFormat *numberFormatToSet, UErrorCode *status)
Set the UNumberFormat for specific field associated with an UDateFormat.
void udat_setBooleanAttribute(UDateFormat *fmt, UDateFormatBooleanAttribute attr, UBool newValue, UErrorCode *status)
Set a boolean attribute associated with a UDateFormat.
Standalone context versions of quarters.
Definition: udat.h:1286
UDateFormatField
FieldPosition and UFieldPosition selectors for format fields defined by DateFormat and UDateFormat...
Definition: udat.h:487
FieldPosition and UFieldPosition selector for 'G' field alignment, corresponding to the UCAL_ERA fiel...
Definition: udat.h:493
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:476
UDateFormat * udat_clone(const UDateFormat *fmt, UErrorCode *status)
Open a copy of a UDateFormat.
ULocDataLocaleType
Constants for *_getLocale() Allow user to select whether she wants information on requested...
Definition: uloc.h:336
FieldPosition and UFieldPosition selector for 'm' field alignment, corresponding to the UCAL_MINUTE f...
Definition: udat.h:539
int32_t udat_countSymbols(const UDateFormat *fmt, UDateFormatSymbolType type)
Count the number of particular symbols for an UDateFormat.
The CLDR-style stand-alone "abbreviated" (not "short") weekday names.
Definition: udat.h:1278
The narrow month names, for example F.
Definition: udat.h:1265
Cyclic year names (only supported for some calendars, and only for FORMAT usage)
Definition: udat.h:1313
FieldPosition selector for 'x' field alignment, corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OF...
Definition: udat.h:752
FieldPosition and UFieldPosition selector for 's' field alignment, corresponding to the UCAL_SECOND f...
Definition: udat.h:546
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.
Definition: udat.h:1257
FieldPosition and UFieldPosition selector for 'z' field alignment, corresponding to the UCAL_ZONE_OFF...
Definition: udat.h:629
FieldPosition and UFieldPosition selector for 'y' field alignment, corresponding to the UCAL_YEAR fie...
Definition: udat.h:500
FieldPosition selector for 'L' field alignment, corresponding to the UCAL_MONTH field.
Definition: udat.h:694
The AM/PM names, for example AM.
Definition: udat.h:1259
Number of FieldPosition and UFieldPosition selectors for DateFormat and UDateFormat.
Definition: udat.h:771
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...
Definition: udat.h:672
UDate udat_get2DigitYearStart(const UDateFormat *fmt, UErrorCode *status)
Get the year relative to which all 2-digit years are interpreted.
int32_t udat_countAvailable(void)
Determine how many locales have date/time formatting patterns available.
#define U_DRAFT
This is used to declare a function as a draft public ICU C API.
Definition: umachine.h:111
FieldPosition and UFieldPosition selector for 'H' field alignment, corresponding to the UCAL_HOUR_OF_...
Definition: udat.h:532
UDateFormatBooleanAttribute
DateFormat boolean attributes.
Definition: udat.h:844
FieldPosition and UFieldPosition selector for 'S' field alignment, corresponding to the UCAL_MILLISEC...
Definition: udat.h:561
FieldPosition and UFieldPosition selector for 'h' field alignment, corresponding to the UCAL_HOUR fie...
Definition: udat.h:612
Calendar zodiac names (only supported for some calendars, and only for FORMAT usage) ...
Definition: udat.h:1330
UDateFormatOpener udat_unregisterOpener(UDateFormatOpener opener, UErrorCode *status)
Un-Register a provider factory.
FieldPosition selector for "U" field alignment, corresponding to cyclic year names.
Definition: udat.h:728
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.
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:109
int8_t UBool
The ICU boolean type.
Definition: umachine.h:234
C API: NumberFormat.
Medium style.
Definition: udat.h:161
Standalone version of UDAT_SHORTER_WEEKDAYS.
Definition: udat.h:1300