ICU 55.1  55.1
udat.h
Go to the documentation of this file.
1 /*
2  *******************************************************************************
3  * Copyright (C) 1996-2015, 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"
19 #include "unicode/ufieldpositer.h"
151 typedef void* UDateFormat;
152 
156 typedef enum UDateFormatStyle {
167 
169  UDAT_RELATIVE = (1 << 7),
170 
171  UDAT_FULL_RELATIVE = UDAT_FULL | UDAT_RELATIVE,
172 
173  UDAT_LONG_RELATIVE = UDAT_LONG | UDAT_RELATIVE,
174 
175  UDAT_MEDIUM_RELATIVE = UDAT_MEDIUM | UDAT_RELATIVE,
176 
177  UDAT_SHORT_RELATIVE = UDAT_SHORT | UDAT_RELATIVE,
178 
179 
181  UDAT_NONE = -1,
182 
189 
190 #ifndef U_HIDE_INTERNAL_API
193 #endif /* U_HIDE_INTERNAL_API */
195 
196 /* Skeletons for dates. */
197 
202 #define UDAT_YEAR "y"
203 
207 #define UDAT_QUARTER "QQQQ"
208 
212 #define UDAT_ABBR_QUARTER "QQQ"
213 
217 #define UDAT_YEAR_QUARTER "yQQQQ"
218 
222 #define UDAT_YEAR_ABBR_QUARTER "yQQQ"
223 
227 #define UDAT_MONTH "MMMM"
228 
232 #define UDAT_ABBR_MONTH "MMM"
233 
237 #define UDAT_NUM_MONTH "M"
238 
242 #define UDAT_YEAR_MONTH "yMMMM"
243 
247 #define UDAT_YEAR_ABBR_MONTH "yMMM"
248 
252 #define UDAT_YEAR_NUM_MONTH "yM"
253 
257 #define UDAT_DAY "d"
258 
263 #define UDAT_YEAR_MONTH_DAY "yMMMMd"
264 
269 #define UDAT_YEAR_ABBR_MONTH_DAY "yMMMd"
270 
275 #define UDAT_YEAR_NUM_MONTH_DAY "yMd"
276 
280 #define UDAT_WEEKDAY "EEEE"
281 
285 #define UDAT_ABBR_WEEKDAY "E"
286 
291 #define UDAT_YEAR_MONTH_WEEKDAY_DAY "yMMMMEEEEd"
292 
297 #define UDAT_YEAR_ABBR_MONTH_WEEKDAY_DAY "yMMMEd"
298 
303 #define UDAT_YEAR_NUM_MONTH_WEEKDAY_DAY "yMEd"
304 
309 #define UDAT_MONTH_DAY "MMMMd"
310 
315 #define UDAT_ABBR_MONTH_DAY "MMMd"
316 
321 #define UDAT_NUM_MONTH_DAY "Md"
322 
327 #define UDAT_MONTH_WEEKDAY_DAY "MMMMEEEEd"
328 
333 #define UDAT_ABBR_MONTH_WEEKDAY_DAY "MMMEd"
334 
339 #define UDAT_NUM_MONTH_WEEKDAY_DAY "MEd"
340 
341 /* Skeletons for times. */
342 
347 #define UDAT_HOUR "j"
348 
352 #define UDAT_HOUR24 "H"
353 
357 #define UDAT_MINUTE "m"
358 
363 #define UDAT_HOUR_MINUTE "jm"
364 
369 #define UDAT_HOUR24_MINUTE "Hm"
370 
374 #define UDAT_SECOND "s"
375 
381 #define UDAT_HOUR_MINUTE_SECOND "jms"
382 
388 #define UDAT_HOUR24_MINUTE_SECOND "Hms"
389 
394 #define UDAT_MINUTE_SECOND "ms"
395 
396 /* Skeletons for time zones. */
397 
405 #define UDAT_LOCATION_TZ "VVVV"
406 
413 #define UDAT_GENERIC_TZ "vvvv"
414 
421 #define UDAT_ABBR_GENERIC_TZ "v"
422 
429 #define UDAT_SPECIFIC_TZ "zzzz"
430 
437 #define UDAT_ABBR_SPECIFIC_TZ "z"
438 
445 #define UDAT_ABBR_UTC_TZ "ZZZZ"
446 
447 /* deprecated skeleton constants */
448 
449 #ifndef U_HIDE_DEPRECATED_API
450 
454 #define UDAT_STANDALONE_MONTH "LLLL"
455 
459 #define UDAT_ABBR_STANDALONE_MONTH "LLL"
460 
465 #define UDAT_HOUR_MINUTE_GENERIC_TZ "jmv"
466 
470 #define UDAT_HOUR_MINUTE_TZ "jmz"
471 
475 #define UDAT_HOUR_GENERIC_TZ "jv"
476 
480 #define UDAT_HOUR_TZ "jz"
481 #endif /* U_HIDE_DEPRECATED_API */
482 
488 typedef enum UDateFormatField {
495 
502 
509 
516 
525 
534 
541 
548 
563 
570 
577 
584 
591 
598 
605 
614 
623 
631 
638 
645 
652 
659 
666 
674 
688 
696 
705 
714 
721 
730 
738 
746 
754 
755 #ifndef U_HIDE_INTERNAL_API
756 
762 #endif /* U_HIDE_INTERNAL_API */
763 
764 #ifndef U_HIDE_DRAFT_API
765 
771 #endif /* U_HIDE_DRAFT_API */
772 
782 
784 
785 
796 
797 
826 U_STABLE UDateFormat* U_EXPORT2
827 udat_open(UDateFormatStyle timeStyle,
828  UDateFormatStyle dateStyle,
829  const char *locale,
830  const UChar *tzID,
831  int32_t tzIDLength,
832  const UChar *pattern,
833  int32_t patternLength,
834  UErrorCode *status);
835 
836 
843 U_STABLE void U_EXPORT2
844 udat_close(UDateFormat* format);
845 
846 
864 #ifndef U_HIDE_DRAFT_API
865 
876 #endif /* U_HIDE_DRAFT_API */
877 
883 
894 U_STABLE UBool U_EXPORT2
896 
907 U_STABLE void U_EXPORT2
909 
910 
911 
912 #if U_SHOW_CPLUSPLUS_API
913 
915 
926 
928 
929 #endif
930 
939 U_STABLE UDateFormat* U_EXPORT2
940 udat_clone(const UDateFormat *fmt,
941  UErrorCode *status);
942 
961 U_STABLE int32_t U_EXPORT2
962 udat_format( const UDateFormat* format,
963  UDate dateToFormat,
964  UChar* result,
965  int32_t resultLength,
966  UFieldPosition* position,
967  UErrorCode* status);
968 
969 #ifndef U_HIDE_DRAFT_API
970 
992 U_DRAFT int32_t U_EXPORT2
993 udat_formatCalendar( const UDateFormat* format,
994  UCalendar* calendar,
995  UChar* result,
996  int32_t capacity,
997  UFieldPosition* position,
998  UErrorCode* status);
999 
1027 U_DRAFT int32_t U_EXPORT2
1028 udat_formatForFields( const UDateFormat* format,
1029  UDate dateToFormat,
1030  UChar* result,
1031  int32_t resultLength,
1032  UFieldPositionIterator* fpositer,
1033  UErrorCode* status);
1034 
1065 U_DRAFT int32_t U_EXPORT2
1067  UCalendar* calendar,
1068  UChar* result,
1069  int32_t capacity,
1070  UFieldPositionIterator* fpositer,
1071  UErrorCode* status);
1072 
1073 #endif /* U_HIDE_DRAFT_API */
1074 
1100 U_STABLE UDate U_EXPORT2
1101 udat_parse(const UDateFormat* format,
1102  const UChar* text,
1103  int32_t textLength,
1104  int32_t *parsePos,
1105  UErrorCode *status);
1106 
1128 U_STABLE void U_EXPORT2
1129 udat_parseCalendar(const UDateFormat* format,
1130  UCalendar* calendar,
1131  const UChar* text,
1132  int32_t textLength,
1133  int32_t *parsePos,
1134  UErrorCode *status);
1135 
1145 U_STABLE UBool U_EXPORT2
1146 udat_isLenient(const UDateFormat* fmt);
1147 
1157 U_STABLE void U_EXPORT2
1159  UBool isLenient);
1160 
1170 U_STABLE const UCalendar* U_EXPORT2
1171 udat_getCalendar(const UDateFormat* fmt);
1172 
1182 U_STABLE void U_EXPORT2
1184  const UCalendar* calendarToSet);
1185 
1195 U_STABLE const UNumberFormat* U_EXPORT2
1196 udat_getNumberFormat(const UDateFormat* fmt);
1197 
1198 #ifndef U_HIDE_DRAFT_API
1199 
1208 U_DRAFT const UNumberFormat* U_EXPORT2
1210 
1226 U_DRAFT void U_EXPORT2
1228  const UChar* fields,
1229  UNumberFormat* numberFormatToSet,
1230  UErrorCode* status);
1231 #endif /* U_HIDE_DRAFT_API */
1232 
1245 U_STABLE void U_EXPORT2
1247  const UNumberFormat* numberFormatToSet);
1248 
1249 #ifndef U_HIDE_DRAFT_API
1250 
1259 U_DRAFT void U_EXPORT2
1261  UNumberFormat* numberFormatToAdopt);
1262 #endif /* U_HIDE_DRAFT_API */
1263 
1273 U_STABLE const char* U_EXPORT2
1274 udat_getAvailable(int32_t localeIndex);
1275 
1284 U_STABLE int32_t U_EXPORT2
1285 udat_countAvailable(void);
1286 
1297 U_STABLE UDate U_EXPORT2
1299  UErrorCode *status);
1300 
1311 U_STABLE void U_EXPORT2
1313  UDate d,
1314  UErrorCode *status);
1315 
1328 U_STABLE int32_t U_EXPORT2
1329 udat_toPattern( const UDateFormat *fmt,
1330  UBool localized,
1331  UChar *result,
1332  int32_t resultLength,
1333  UErrorCode *status);
1334 
1345 U_STABLE void U_EXPORT2
1347  UBool localized,
1348  const UChar *pattern,
1349  int32_t patternLength);
1350 
1381  UDAT_STANDALONE_SHORT_MONTHS,
1382  UDAT_STANDALONE_NARROW_MONTHS,
1398  UDAT_STANDALONE_SHORT_QUARTERS,
1412 #ifndef U_HIDE_DRAFT_API
1413  ,
1448 #endif /* U_HIDE_DRAFT_API */
1450 
1451 struct UDateFormatSymbols;
1457 
1474 U_STABLE int32_t U_EXPORT2
1475 udat_getSymbols(const UDateFormat *fmt,
1476  UDateFormatSymbolType type,
1477  int32_t symbolIndex,
1478  UChar *result,
1479  int32_t resultLength,
1480  UErrorCode *status);
1481 
1494 U_STABLE int32_t U_EXPORT2
1495 udat_countSymbols( const UDateFormat *fmt,
1496  UDateFormatSymbolType type);
1497 
1513 U_STABLE void U_EXPORT2
1514 udat_setSymbols( UDateFormat *format,
1515  UDateFormatSymbolType type,
1516  int32_t symbolIndex,
1517  UChar *value,
1518  int32_t valueLength,
1519  UErrorCode *status);
1520 
1530 U_STABLE const char* U_EXPORT2
1532  ULocDataLocaleType type,
1533  UErrorCode* status);
1534 
1543 U_DRAFT void U_EXPORT2
1545 
1555 U_STABLE UDisplayContext U_EXPORT2
1556 udat_getContext(const UDateFormat* fmt, UDisplayContextType type, UErrorCode* status);
1557 
1558 #ifndef U_HIDE_INTERNAL_API
1559 
1570 U_INTERNAL int32_t U_EXPORT2
1572  UChar *result,
1573  int32_t resultLength,
1574  UErrorCode *status);
1575 
1587 U_INTERNAL int32_t U_EXPORT2
1589  UChar *result,
1590  int32_t resultLength,
1591  UErrorCode *status);
1592 
1605 U_INTERNAL void U_EXPORT2
1607  const UChar *datePattern,
1608  int32_t datePatternLength,
1609  const UChar *timePattern,
1610  int32_t timePatternLength,
1611  UErrorCode *status);
1612 
1617 typedef UDateFormat* (U_EXPORT2 *UDateFormatOpener) (UDateFormatStyle timeStyle,
1618  UDateFormatStyle dateStyle,
1619  const char *locale,
1620  const UChar *tzID,
1621  int32_t tzIDLength,
1622  const UChar *pattern,
1623  int32_t patternLength,
1624  UErrorCode *status);
1625 
1630 U_INTERNAL void U_EXPORT2
1632 
1637 U_INTERNAL UDateFormatOpener U_EXPORT2
1639 #endif /* U_HIDE_INTERNAL_API */
1640 
1641 
1642 #endif /* #if !UCONFIG_NO_FORMATTING */
1643 
1644 #endif
int32_t udat_format(const UDateFormat *format, UDate dateToFormat, UChar *result, int32_t resultLength, UFieldPosition *position, UErrorCode *status)
Format a date using a UDateFormat.
void * UCalendar
A calendar.
Definition: ucal.h:153
FieldPosition and UFieldPosition selector for &#39;w&#39; field alignment, corresponding to the UCAL_WEEK_OF_...
Definition: udat.h:590
FieldPosition and UFieldPosition selector for &#39;e&#39; field alignment, corresponding to the UCAL_DOW_LOCA...
Definition: udat.h:644
The CLDR-style short weekday names, e.g.
Definition: udat.h:1406
Standalone context versions of months.
Definition: udat.h:1380
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:1372
FieldPosition and UFieldPosition selector for &#39;V&#39; field alignment, corresponding to the UCAL_ZONE_OFF...
Definition: udat.h:720
The CLDR-style format "narrow" weekday names, for example "M".
Definition: udat.h:1378
FieldPosition selector for "Q" field alignment, corresponding to quarters.
Definition: udat.h:704
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 &#39;M&#39; field alignment, corresponding to the UCAL_MONTH fi...
Definition: udat.h:508
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 &#39;k&#39; field alignment, corresponding to the UCAL_HOUR_OF_...
Definition: udat.h:524
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:1374
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:1447
Short style.
Definition: udat.h:164
The quarters, for example 1st Quarter.
Definition: udat.h:1393
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:181
The CLDR-style stand-alone "wide" weekday names.
Definition: udat.h:1384
Long style.
Definition: udat.h:160
FieldPosition selector for &#39;X&#39; field alignment, corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OF...
Definition: udat.h:745
void udat_setCalendar(UDateFormat *fmt, const UCalendar *calendarToSet)
Set the UCalendar associated with an UDateFormat.
struct UFieldPositionIterator UFieldPositionIterator
C typedef for struct UFieldPositionIterator.
Definition: ufieldpositer.h:43
The short month names, for example Feb.
Definition: udat.h:1361
#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:188
Default style.
Definition: udat.h:166
const UNumberFormat * udat_getNumberFormat(const UDateFormat *fmt)
Get the UNumberFormat associated with an UDateFormat.
count boolean date format constants
Definition: udat.h:881
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 &#39;g&#39; field alignment, corresponding to the UCAL_JULIAN_D...
Definition: udat.h:658
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:863
Bitfield for relative date.
Definition: udat.h:169
FieldPosition and UFieldPosition selector for &#39;D&#39; field alignment, corresponding to the UCAL_DAY_OF_Y...
Definition: udat.h:576
FieldPosition selector for the "q" field alignment, corresponding to stand-alone quarters.
Definition: udat.h:713
FieldPosition and UFieldPosition selector for &#39;u&#39; field alignment, corresponding to the UCAL_EXTENDED...
Definition: udat.h:651
FieldPosition and UFieldPosition selector for &#39;r&#39; field alignment, no directly corresponding UCAL_ fi...
Definition: udat.h:761
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 &#39;c&#39; field alignment, corresponding to the UCAL_DOW_LOCAL field...
Definition: udat.h:687
UDisplayContext udat_getContext(const UDateFormat *fmt, UDisplayContextType type, UErrorCode *status)
Get the formatter&#39;s UDisplayContext value for the specified UDisplayContextType, such as UDISPCTX_TYP...
FieldPosition and UFieldPosition selector for &#39;d&#39; field alignment, corresponding to the UCAL_DATE fie...
Definition: udat.h:515
void udat_close(UDateFormat *format)
Close a UDateFormat.
indicates tolerance of pattern mismatch between input data and specified format pattern.
Definition: udat.h:875
Full style.
Definition: udat.h:158
FieldPosition and UFieldPosition selector for &#39;:&#39; time separator, no corresponding UCAL_ field...
Definition: udat.h:770
FieldPosition and UFieldPosition selector for &#39;Y&#39; field alignment, corresponding to the UCAL_YEAR_WOY...
Definition: udat.h:637
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:1617
FieldPosition and UFieldPosition selector for &#39;F&#39; field alignment, corresponding to the UCAL_DAY_OF_W...
Definition: udat.h:583
UDateFormatSymbolType
The possible types of date format symbols.
Definition: udat.h:1355
The CLDR-style stand-alone "narrow" weekday names.
Definition: udat.h:1391
The month names, for example February.
Definition: udat.h:1359
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:356
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 &#39;O&#39; field alignment, corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OF...
Definition: udat.h:737
FieldPosition and UFieldPosition selector for &#39;A&#39; field alignment, corresponding to the UCAL_MILLISEC...
Definition: udat.h:665
int32_t udat_formatCalendar(const UDateFormat *format, UCalendar *calendar, UChar *result, int32_t capacity, UFieldPosition *position, UErrorCode *status)
Format a date using an UDateFormat.
indicates whether whitespace is allowed.
Definition: udat.h:857
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
void * UDateFormat
A date formatter.
Definition: udat.h:151
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 &#39;v&#39; field alignment, corresponding to the UCAL_ZONE_OFF...
Definition: udat.h:680
The era names, for example AD.
Definition: udat.h:1357
Cyclic year names (only supported for some calendars, and only for FORMAT usage; udat_setSymbols not ...
Definition: udat.h:1419
FieldPosition and UFieldPosition selector for &#39;W&#39; field alignment, corresponding to the UCAL_WEEK_OF_...
Definition: udat.h:597
The CLDR-style format "wide" weekday names, for example Monday.
Definition: udat.h:1363
UCalendarDateFields udat_toCalendarDateField(UDateFormatField field)
Maps from a UDateFormatField to the corresponding UCalendarDateFields.
struct UDateFormatSymbols UDateFormatSymbols
Date format symbols.
Definition: udat.h:1456
UDateFormatStyle
The possible date/time format styles.
Definition: udat.h:156
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.
int32_t udat_formatCalendarForFields(const UDateFormat *format, UCalendar *calendar, UChar *result, int32_t capacity, UFieldPositionIterator *fpositer, UErrorCode *status)
Format a date using a UDateFormat.
Calendar zodiac names (only supported for some calendars, and only for FORMAT usage; udat_setSymbols ...
Definition: udat.h:1436
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 &#39;E&#39; field alignment, corresponding to the UCAL_DAY_OF_W...
Definition: udat.h:569
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 &#39;a&#39; field alignment, corresponding to the UCAL_AM_PM fi...
Definition: udat.h:604
"Smart pointer" class, closes a UDateFormat via udat_close().
The short quarter names, for example Q1.
Definition: udat.h:1395
Cyclic year names (only supported for some calendars, and only for FORMAT usage; udat_setSymbols not ...
Definition: udat.h:1430
FieldPosition and UFieldPosition selector for &#39;K&#39; field alignment, corresponding to the UCAL_HOUR fie...
Definition: udat.h:622
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:869
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:1397
UDateFormatField
FieldPosition and UFieldPosition selectors for format fields defined by DateFormat and UDateFormat...
Definition: udat.h:488
FieldPosition and UFieldPosition selector for &#39;G&#39; field alignment, corresponding to the UCAL_ERA fiel...
Definition: udat.h:494
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 &#39;m&#39; field alignment, corresponding to the UCAL_MINUTE f...
Definition: udat.h:540
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:1389
The narrow month names, for example F.
Definition: udat.h:1376
Cyclic year names (only supported for some calendars, and only for FORMAT usage)
Definition: udat.h:1424
FieldPosition selector for &#39;x&#39; field alignment, corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OF...
Definition: udat.h:753
int32_t udat_formatForFields(const UDateFormat *format, UDate dateToFormat, UChar *result, int32_t resultLength, UFieldPositionIterator *fpositer, UErrorCode *status)
Format a date using a UDateFormat.
C API: UFieldPositionIterator for use with format APIs.
FieldPosition and UFieldPosition selector for &#39;s&#39; field alignment, corresponding to the UCAL_SECOND f...
Definition: udat.h:547
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:1368
FieldPosition and UFieldPosition selector for &#39;z&#39; field alignment, corresponding to the UCAL_ZONE_OFF...
Definition: udat.h:630
FieldPosition and UFieldPosition selector for &#39;y&#39; field alignment, corresponding to the UCAL_YEAR fie...
Definition: udat.h:501
FieldPosition selector for &#39;L&#39; field alignment, corresponding to the UCAL_MONTH field.
Definition: udat.h:695
The AM/PM names, for example AM.
Definition: udat.h:1370
Number of FieldPosition and UFieldPosition selectors for DateFormat and UDateFormat.
Definition: udat.h:781
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 &#39;Z&#39; field alignment, corresponding to the UCAL_ZONE_OFF...
Definition: udat.h:673
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 &#39;H&#39; field alignment, corresponding to the UCAL_HOUR_OF_...
Definition: udat.h:533
UDateFormatBooleanAttribute
DateFormat boolean attributes.
Definition: udat.h:852
FieldPosition and UFieldPosition selector for &#39;S&#39; field alignment, corresponding to the UCAL_MILLISEC...
Definition: udat.h:562
FieldPosition and UFieldPosition selector for &#39;h&#39; field alignment, corresponding to the UCAL_HOUR fie...
Definition: udat.h:613
Calendar zodiac names (only supported for some calendars, and only for FORMAT usage) ...
Definition: udat.h:1441
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:729
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:162
Standalone version of UDAT_SHORTER_WEEKDAYS.
Definition: udat.h:1411