ICU 57.1 57.1
udat.h
Go to the documentation of this file.
1/*
2 *******************************************************************************
3 * Copyright (C) 1996-2016, 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
16#include "unicode/ucal.h"
17#include "unicode/unum.h"
151typedef void* UDateFormat;
152
156typedef 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
182
189
193#endif /* U_HIDE_INTERNAL_API */
195
196/* Skeletons for dates. */
197
202#define UDAT_YEAR "y"
207#define UDAT_QUARTER "QQQQ"
212#define UDAT_ABBR_QUARTER "QQQ"
217#define UDAT_YEAR_QUARTER "yQQQQ"
222#define UDAT_YEAR_ABBR_QUARTER "yQQQ"
227#define UDAT_MONTH "MMMM"
232#define UDAT_ABBR_MONTH "MMM"
237#define UDAT_NUM_MONTH "M"
242#define UDAT_YEAR_MONTH "yMMMM"
247#define UDAT_YEAR_ABBR_MONTH "yMMM"
252#define UDAT_YEAR_NUM_MONTH "yM"
257#define UDAT_DAY "d"
263#define UDAT_YEAR_MONTH_DAY "yMMMMd"
269#define UDAT_YEAR_ABBR_MONTH_DAY "yMMMd"
275#define UDAT_YEAR_NUM_MONTH_DAY "yMd"
280#define UDAT_WEEKDAY "EEEE"
285#define UDAT_ABBR_WEEKDAY "E"
291#define UDAT_YEAR_MONTH_WEEKDAY_DAY "yMMMMEEEEd"
297#define UDAT_YEAR_ABBR_MONTH_WEEKDAY_DAY "yMMMEd"
303#define UDAT_YEAR_NUM_MONTH_WEEKDAY_DAY "yMEd"
309#define UDAT_MONTH_DAY "MMMMd"
315#define UDAT_ABBR_MONTH_DAY "MMMd"
321#define UDAT_NUM_MONTH_DAY "Md"
327#define UDAT_MONTH_WEEKDAY_DAY "MMMMEEEEd"
333#define UDAT_ABBR_MONTH_WEEKDAY_DAY "MMMEd"
339#define UDAT_NUM_MONTH_WEEKDAY_DAY "MEd"
340
341/* Skeletons for times. */
342
347#define UDAT_HOUR "j"
352#define UDAT_HOUR24 "H"
357#define UDAT_MINUTE "m"
363#define UDAT_HOUR_MINUTE "jm"
369#define UDAT_HOUR24_MINUTE "Hm"
374#define UDAT_SECOND "s"
381#define UDAT_HOUR_MINUTE_SECOND "jms"
388#define UDAT_HOUR24_MINUTE_SECOND "Hms"
394#define UDAT_MINUTE_SECOND "ms"
395
396/* Skeletons for time zones. */
397
405#define UDAT_LOCATION_TZ "VVVV"
413#define UDAT_GENERIC_TZ "vvvv"
421#define UDAT_ABBR_GENERIC_TZ "v"
429#define UDAT_SPECIFIC_TZ "zzzz"
437#define UDAT_ABBR_SPECIFIC_TZ "z"
445#define UDAT_ABBR_UTC_TZ "ZZZZ"
446
447/* deprecated skeleton constants */
448
449#ifndef U_HIDE_DEPRECATED_API
454#define UDAT_STANDALONE_MONTH "LLLL"
459#define UDAT_ABBR_STANDALONE_MONTH "LLL"
460
465#define UDAT_HOUR_MINUTE_GENERIC_TZ "jmv"
470#define UDAT_HOUR_MINUTE_TZ "jmz"
475#define UDAT_HOUR_GENERIC_TZ "jv"
480#define UDAT_HOUR_TZ "jz"
481#endif /* U_HIDE_DEPRECATED_API */
482
488typedef 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
762#endif /* U_HIDE_INTERNAL_API */
763
764#ifndef U_HIDE_DRAFT_API
772
773 /* FieldPosition selector for 'B' field alignment.
774 * Displays flexible day periods, such as "in the morning", if available.
775 * @draft ICU 57
776 */
777 UDAT_FLEXIBLE_DAY_PERIOD_FIELD = 36,
778#endif /* U_HIDE_DRAFT_API */
779
780#ifndef U_HIDE_INTERNAL_API
788#endif /* U_HIDE_INTERNAL_API */
789
799
801
802
803#ifndef U_HIDE_INTERNAL_API
809#define UDAT_HAS_PATTERN_CHAR_FOR_TIME_SEPARATOR 0
810#endif /* U_HIDE_INTERNAL_API */
811
812
823
824
856 const char *locale,
857 const UChar *tzID,
858 int32_t tzIDLength,
859 const UChar *pattern,
860 int32_t patternLength,
862
863
872
873
911
924
937
938
939
940#if U_SHOW_CPLUSPLUS_API
941
943
954
956
957#endif
958
970
989U_STABLE int32_t U_EXPORT2
992 UChar* result,
993 int32_t resultLength,
996
1019U_STABLE int32_t U_EXPORT2
1022 UChar* result,
1023 int32_t capacity,
1026
1054U_STABLE int32_t U_EXPORT2
1057 UChar* result,
1058 int32_t resultLength,
1061
1092U_STABLE int32_t U_EXPORT2
1095 UChar* result,
1096 int32_t capacity,
1099
1100
1128 const UChar* text,
1129 int32_t textLength,
1130 int32_t *parsePos,
1132
1157 const UChar* text,
1158 int32_t textLength,
1159 int32_t *parsePos,
1161
1173
1185 UBool isLenient);
1186
1198
1210 const UCalendar* calendarToSet);
1211
1223
1235
1253 const UChar* fields,
1292U_STABLE const char* U_EXPORT2
1294
1303U_STABLE int32_t U_EXPORT2
1305
1319
1332 UDate d,
1334
1347U_STABLE int32_t U_EXPORT2
1350 UChar *result,
1351 int32_t resultLength,
1353
1367 const UChar *pattern,
1368 int32_t patternLength);
1369
1466
1467struct UDateFormatSymbols;
1473
1490U_STABLE int32_t U_EXPORT2
1493 int32_t symbolIndex,
1494 UChar *result,
1495 int32_t resultLength,
1497
1510U_STABLE int32_t U_EXPORT2
1513
1532 int32_t symbolIndex,
1533 UChar *value,
1534 int32_t valueLength,
1536
1546U_STABLE const char* U_EXPORT2
1548 ULocDataLocaleType type,
1550
1559U_DRAFT void U_EXPORT2
1561
1573
1574#ifndef U_HIDE_INTERNAL_API
1586U_INTERNAL int32_t U_EXPORT2
1588 UChar *result,
1589 int32_t resultLength,
1591
1603U_INTERNAL int32_t U_EXPORT2
1605 UChar *result,
1606 int32_t resultLength,
1608
1623 const UChar *datePattern,
1624 int32_t datePatternLength,
1625 const UChar *timePattern,
1626 int32_t timePatternLength,
1628
1635 const char *locale,
1636 const UChar *tzID,
1637 int32_t tzIDLength,
1638 const UChar *pattern,
1639 int32_t patternLength,
1641
1648
1655#endif /* U_HIDE_INTERNAL_API */
1656
1657
1658#endif /* #if !UCONFIG_NO_FORMATTING */
1659
1660#endif
"Smart pointer" base class; do not use directly: use LocalPointer etc.
"Smart pointer" class, closes a UDateFormat via udat_close().
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
A struct representing a range of text containing a specific field.
Definition umisc.h:32
C API: Calendar.
UCalendarDateFields
Possible fields in a UCalendar.
Definition ucal.h:183
int32_t udat_toPattern(const UDateFormat *fmt, UBool localized, UChar *result, int32_t resultLength, UErrorCode *status)
Extract the pattern from a UDateFormat.
void udat_set2DigitYearStart(UDateFormat *fmt, UDate d, UErrorCode *status)
Set the year relative to which all 2-digit years will be interpreted.
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.
const UNumberFormat * udat_getNumberFormatForField(const UDateFormat *fmt, UChar field)
Get the UNumberFormat for specific field associated with an UDateFormat.
UBool udat_getBooleanAttribute(const UDateFormat *fmt, UDateFormatBooleanAttribute attr, UErrorCode *status)
Get a boolean attribute associated with a UDateFormat.
UDate udat_get2DigitYearStart(const UDateFormat *fmt, UErrorCode *status)
Get the year relative to which all 2-digit years are interpreted.
UDisplayContext udat_getContext(const UDateFormat *fmt, UDisplayContextType type, UErrorCode *status)
Get the formatter's UDisplayContext value for the specified UDisplayContextType, such as UDISPCTX_TYP...
int32_t udat_formatCalendar(const UDateFormat *format, UCalendar *calendar, UChar *result, int32_t capacity, UFieldPosition *position, UErrorCode *status)
Format a date using an UDateFormat.
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.
void * UDateFormat
A date formatter.
Definition udat.h:151
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.
void udat_setContext(UDateFormat *fmt, UDisplayContext value, UErrorCode *status)
Set a particular UDisplayContext value in the formatter, such as UDISPCTX_CAPITALIZATION_FOR_STANDALO...
void udat_applyPattern(UDateFormat *format, UBool localized, const UChar *pattern, int32_t patternLength)
Set the pattern used by an UDateFormat.
int32_t udat_countAvailable(void)
Determine how many locales have date/time formatting patterns available.
int32_t udat_formatForFields(const UDateFormat *format, UDate dateToFormat, UChar *result, int32_t resultLength, UFieldPositionIterator *fpositer, UErrorCode *status)
Format a date using a UDateFormat.
void udat_setLenient(UDateFormat *fmt, UBool isLenient)
Specify whether an UDateFormat will perform lenient parsing.
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:1633
UCalendarDateFields udat_toCalendarDateField(UDateFormatField field)
Maps from a UDateFormatField to the corresponding UCalendarDateFields.
UDateFormatSymbolType
The possible types of date format symbols.
Definition udat.h:1374
@ UDAT_ERAS
The era names, for example AD.
Definition udat.h:1376
@ UDAT_CYCLIC_YEARS_WIDE
Cyclic year names (only supported for some calendars, and only for FORMAT usage; udat_setSymbols not ...
Definition udat.h:1436
@ UDAT_CYCLIC_YEARS_NARROW
Cyclic year names (only supported for some calendars, and only for FORMAT usage; udat_setSymbols not ...
Definition udat.h:1447
@ UDAT_STANDALONE_NARROW_WEEKDAYS
The CLDR-style stand-alone "narrow" weekday names.
Definition udat.h:1410
@ UDAT_SHORT_QUARTERS
The short quarter names, for example Q1.
Definition udat.h:1414
@ UDAT_STANDALONE_QUARTERS
Standalone context versions of quarters.
Definition udat.h:1416
@ UDAT_SHORT_WEEKDAYS
The CLDR-style format "abbreviated" (not "short") weekday names, for example "Mon....
Definition udat.h:1387
@ UDAT_ZODIAC_NAMES_NARROW
Calendar zodiac names (only supported for some calendars, and only for FORMAT usage; udat_setSymbols ...
Definition udat.h:1464
@ UDAT_NARROW_WEEKDAYS
The CLDR-style format "narrow" weekday names, for example "M".
Definition udat.h:1397
@ UDAT_STANDALONE_WEEKDAYS
The CLDR-style stand-alone "wide" weekday names.
Definition udat.h:1403
@ UDAT_ERA_NAMES
The long era names, for example Anno Domini.
Definition udat.h:1393
@ UDAT_STANDALONE_SHORTER_WEEKDAYS
Standalone version of UDAT_SHORTER_WEEKDAYS.
Definition udat.h:1430
@ UDAT_WEEKDAYS
The CLDR-style format "wide" weekday names, for example Monday.
Definition udat.h:1382
@ UDAT_QUARTERS
The quarters, for example 1st Quarter.
Definition udat.h:1412
@ UDAT_LOCALIZED_CHARS
The localized characters.
Definition udat.h:1391
@ UDAT_SHORTER_WEEKDAYS
The CLDR-style short weekday names, e.g.
Definition udat.h:1425
@ UDAT_ZODIAC_NAMES_ABBREVIATED
Calendar zodiac names (only supported for some calendars, and only for FORMAT usage)
Definition udat.h:1458
@ UDAT_ZODIAC_NAMES_WIDE
Calendar zodiac names (only supported for some calendars, and only for FORMAT usage; udat_setSymbols ...
Definition udat.h:1453
@ UDAT_MONTHS
The month names, for example February.
Definition udat.h:1378
@ UDAT_NARROW_MONTHS
The narrow month names, for example F.
Definition udat.h:1395
@ UDAT_CYCLIC_YEARS_ABBREVIATED
Cyclic year names (only supported for some calendars, and only for FORMAT usage)
Definition udat.h:1441
@ UDAT_STANDALONE_MONTHS
Standalone context versions of months.
Definition udat.h:1399
@ UDAT_STANDALONE_SHORT_WEEKDAYS
The CLDR-style stand-alone "abbreviated" (not "short") weekday names.
Definition udat.h:1408
@ UDAT_SHORT_MONTHS
The short month names, for example Feb.
Definition udat.h:1380
@ UDAT_AM_PMS
The AM/PM names, for example AM.
Definition udat.h:1389
void udat_setNumberFormat(UDateFormat *fmt, const UNumberFormat *numberFormatToSet)
Set the UNumberFormat associated with an UDateFormat.
int32_t udat_format(const UDateFormat *format, UDate dateToFormat, UChar *result, int32_t resultLength, UFieldPosition *position, UErrorCode *status)
Format a date using a UDateFormat.
UDateFormat * udat_clone(const UDateFormat *fmt, UErrorCode *status)
Open a copy of a UDateFormat.
int32_t udat_countSymbols(const UDateFormat *fmt, UDateFormatSymbolType type)
Count the number of particular symbols for an UDateFormat.
const UCalendar * udat_getCalendar(const UDateFormat *fmt)
Get the UCalendar associated with an UDateFormat.
int32_t udat_formatCalendarForFields(const UDateFormat *format, UCalendar *calendar, UChar *result, int32_t capacity, UFieldPositionIterator *fpositer, UErrorCode *status)
Format a date using a UDateFormat.
UDateFormatOpener udat_unregisterOpener(UDateFormatOpener opener, UErrorCode *status)
Un-Register a provider factory.
void udat_close(UDateFormat *format)
Close a UDateFormat.
struct UDateFormatSymbols UDateFormatSymbols
Date format symbols.
Definition udat.h:1472
void udat_setCalendar(UDateFormat *fmt, const UCalendar *calendarToSet)
Set the UCalendar associated with an UDateFormat.
const UNumberFormat * udat_getNumberFormat(const UDateFormat *fmt)
Get the UNumberFormat associated with an UDateFormat.
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.
const char * udat_getLocaleByType(const UDateFormat *fmt, ULocDataLocaleType type, UErrorCode *status)
Get the locale for this date format object.
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.
void udat_registerOpener(UDateFormatOpener opener, UErrorCode *status)
Register a provider factory.
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.
void udat_adoptNumberFormat(UDateFormat *fmt, UNumberFormat *numberFormatToAdopt)
Adopt the UNumberFormat associated with an UDateFormat.
void udat_setBooleanAttribute(UDateFormat *fmt, UDateFormatBooleanAttribute attr, UBool newValue, UErrorCode *status)
Set a boolean attribute associated with a UDateFormat.
UDateFormatField
FieldPosition and UFieldPosition selectors for format fields defined by DateFormat and UDateFormat.
Definition udat.h:488
@ UDAT_AM_PM_FIELD
FieldPosition and UFieldPosition selector for 'a' field alignment, corresponding to the UCAL_AM_PM fi...
Definition udat.h:604
@ UDAT_TIMEZONE_FIELD
FieldPosition and UFieldPosition selector for 'z' field alignment, corresponding to the UCAL_ZONE_OFF...
Definition udat.h:630
@ UDAT_DOW_LOCAL_FIELD
FieldPosition and UFieldPosition selector for 'e' field alignment, corresponding to the UCAL_DOW_LOCA...
Definition udat.h:644
@ UDAT_DATE_FIELD
FieldPosition and UFieldPosition selector for 'd' field alignment, corresponding to the UCAL_DATE fie...
Definition udat.h:515
@ UDAT_MONTH_FIELD
FieldPosition and UFieldPosition selector for 'M' field alignment, corresponding to the UCAL_MONTH fi...
Definition udat.h:508
@ UDAT_JULIAN_DAY_FIELD
FieldPosition and UFieldPosition selector for 'g' field alignment, corresponding to the UCAL_JULIAN_D...
Definition udat.h:658
@ UDAT_FIELD_COUNT
Number of FieldPosition and UFieldPosition selectors for DateFormat and UDateFormat.
Definition udat.h:798
@ UDAT_EXTENDED_YEAR_FIELD
FieldPosition and UFieldPosition selector for 'u' field alignment, corresponding to the UCAL_EXTENDED...
Definition udat.h:651
@ UDAT_RELATED_YEAR_FIELD
FieldPosition and UFieldPosition selector for 'r' field alignment, no directly corresponding UCAL_ fi...
Definition udat.h:761
@ UDAT_DAY_OF_WEEK_FIELD
FieldPosition and UFieldPosition selector for 'E' field alignment, corresponding to the UCAL_DAY_OF_W...
Definition udat.h:569
@ UDAT_MILLISECONDS_IN_DAY_FIELD
FieldPosition and UFieldPosition selector for 'A' field alignment, corresponding to the UCAL_MILLISEC...
Definition udat.h:665
@ UDAT_TIMEZONE_SPECIAL_FIELD
FieldPosition and UFieldPosition selector for 'V' field alignment, corresponding to the UCAL_ZONE_OFF...
Definition udat.h:720
@ UDAT_YEAR_FIELD
FieldPosition and UFieldPosition selector for 'y' field alignment, corresponding to the UCAL_YEAR fie...
Definition udat.h:501
@ UDAT_ERA_FIELD
FieldPosition and UFieldPosition selector for 'G' field alignment, corresponding to the UCAL_ERA fiel...
Definition udat.h:494
@ UDAT_STANDALONE_QUARTER_FIELD
FieldPosition selector for the "q" field alignment, corresponding to stand-alone quarters.
Definition udat.h:713
@ UDAT_QUARTER_FIELD
FieldPosition selector for "Q" field alignment, corresponding to quarters.
Definition udat.h:704
@ UDAT_TIMEZONE_RFC_FIELD
FieldPosition and UFieldPosition selector for 'Z' field alignment, corresponding to the UCAL_ZONE_OFF...
Definition udat.h:673
@ UDAT_DAY_OF_YEAR_FIELD
FieldPosition and UFieldPosition selector for 'D' field alignment, corresponding to the UCAL_DAY_OF_Y...
Definition udat.h:576
@ UDAT_WEEK_OF_MONTH_FIELD
FieldPosition and UFieldPosition selector for 'W' field alignment, corresponding to the UCAL_WEEK_OF_...
Definition udat.h:597
@ UDAT_FRACTIONAL_SECOND_FIELD
FieldPosition and UFieldPosition selector for 'S' field alignment, corresponding to the UCAL_MILLISEC...
Definition udat.h:562
@ UDAT_STANDALONE_DAY_FIELD
FieldPosition selector for 'c' field alignment, corresponding to the UCAL_DOW_LOCAL field.
Definition udat.h:687
@ UDAT_TIME_SEPARATOR_FIELD
FieldPosition and UFieldPosition selector for time separator, no corresponding UCAL_ field.
Definition udat.h:787
@ UDAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD
FieldPosition selector for 'O' field alignment, corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OF...
Definition udat.h:737
@ UDAT_DAY_OF_WEEK_IN_MONTH_FIELD
FieldPosition and UFieldPosition selector for 'F' field alignment, corresponding to the UCAL_DAY_OF_W...
Definition udat.h:583
@ UDAT_TIMEZONE_ISO_LOCAL_FIELD
FieldPosition selector for 'x' field alignment, corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OF...
Definition udat.h:753
@ UDAT_SECOND_FIELD
FieldPosition and UFieldPosition selector for 's' field alignment, corresponding to the UCAL_SECOND f...
Definition udat.h:547
@ UDAT_HOUR1_FIELD
FieldPosition and UFieldPosition selector for 'h' field alignment, corresponding to the UCAL_HOUR fie...
Definition udat.h:613
@ UDAT_YEAR_NAME_FIELD
FieldPosition selector for "U" field alignment, corresponding to cyclic year names.
Definition udat.h:729
@ UDAT_AM_PM_MIDNIGHT_NOON_FIELD
FieldPosition selector for 'b' field alignment.
Definition udat.h:771
@ UDAT_MINUTE_FIELD
FieldPosition and UFieldPosition selector for 'm' field alignment, corresponding to the UCAL_MINUTE f...
Definition udat.h:540
@ UDAT_TIMEZONE_GENERIC_FIELD
FieldPosition and UFieldPosition selector for 'v' field alignment, corresponding to the UCAL_ZONE_OFF...
Definition udat.h:680
@ UDAT_HOUR0_FIELD
FieldPosition and UFieldPosition selector for 'K' field alignment, corresponding to the UCAL_HOUR fie...
Definition udat.h:622
@ UDAT_YEAR_WOY_FIELD
FieldPosition and UFieldPosition selector for 'Y' field alignment, corresponding to the UCAL_YEAR_WOY...
Definition udat.h:637
@ UDAT_WEEK_OF_YEAR_FIELD
FieldPosition and UFieldPosition selector for 'w' field alignment, corresponding to the UCAL_WEEK_OF_...
Definition udat.h:590
@ UDAT_TIMEZONE_ISO_FIELD
FieldPosition selector for 'X' field alignment, corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OF...
Definition udat.h:745
@ UDAT_HOUR_OF_DAY0_FIELD
FieldPosition and UFieldPosition selector for 'H' field alignment, corresponding to the UCAL_HOUR_OF_...
Definition udat.h:533
@ UDAT_STANDALONE_MONTH_FIELD
FieldPosition selector for 'L' field alignment, corresponding to the UCAL_MONTH field.
Definition udat.h:695
@ UDAT_HOUR_OF_DAY1_FIELD
FieldPosition and UFieldPosition selector for 'k' field alignment, corresponding to the UCAL_HOUR_OF_...
Definition udat.h:524
UDateFormatStyle
The possible date/time format styles.
Definition udat.h:156
@ UDAT_PATTERN
Use the pattern given in the parameter to udat_open.
Definition udat.h:188
@ UDAT_RELATIVE
Bitfield for relative date.
Definition udat.h:169
@ UDAT_DEFAULT
Default style.
Definition udat.h:166
@ UDAT_IGNORE
Definition udat.h:192
@ UDAT_SHORT
Short style.
Definition udat.h:164
@ UDAT_FULL
Full style.
Definition udat.h:158
@ UDAT_LONG
Long style.
Definition udat.h:160
@ UDAT_MEDIUM
Medium style.
Definition udat.h:162
@ UDAT_NONE
No style.
Definition udat.h:181
const char * udat_getAvailable(int32_t localeIndex)
Get a locale for which date/time formatting patterns are available.
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.
UBool udat_isLenient(const UDateFormat *fmt)
Determine if an UDateFormat will perform lenient parsing.
void udat_setSymbols(UDateFormat *format, UDateFormatSymbolType type, int32_t symbolIndex, UChar *value, int32_t valueLength, UErrorCode *status)
Set the symbols associated with an UDateFormat.
UDateFormatBooleanAttribute
DateFormat boolean attributes.
Definition udat.h:879
@ UDAT_PARSE_ALLOW_WHITESPACE
indicates whether whitespace is allowed.
Definition udat.h:884
@ UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH
indicates tolerance of pattern mismatch between input data and specified format pattern.
Definition udat.h:903
@ UDAT_BOOLEAN_ATTRIBUTE_COUNT
count boolean date format constants
Definition udat.h:909
@ UDAT_PARSE_PARTIAL_LITERAL_MATCH
indicates tolerance of a partial literal match e.g.
Definition udat.h:897
@ UDAT_PARSE_ALLOW_NUMERIC
indicates tolerance of numeric data when String data may be assumed.
Definition udat.h:890
void udat_adoptNumberFormatForFields(UDateFormat *fmt, const UChar *fields, UNumberFormat *numberFormatToSet, UErrorCode *status)
Set the UNumberFormat for specific field associated with an UDateFormat.
C API: Display context types (enum values)
UDisplayContextType
Display context types, for getting values of a particular setting.
UDisplayContext
Display context settings.
C API: UFieldPositionIterator for use with format APIs.
struct UFieldPositionIterator UFieldPositionIterator
C typedef for struct UFieldPositionIterator.
ULocDataLocaleType
Constants for *_getLocale() Allow user to select whether she wants information on requested,...
Definition uloc.h:336
#define U_INTERNAL
This is used to declare a function as an internal ICU C API
Definition umachine.h:117
int8_t UBool
The ICU boolean type.
Definition umachine.h:234
#define U_DRAFT
This is used to declare a function as a draft public ICU C API
Definition umachine.h:111
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_STABLE
This is used to declare a function as a stable public ICU C API.
Definition umachine.h:109
C API: NumberFormat.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
Definition utypes.h:476
#define U_HIDE_INTERNAL_API
Define this to 1 to request that internal API be "hidden".
Definition utypes.h:85
double UDate
Date and Time data type.
Definition utypes.h:201
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition uversion.h:130
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition uversion.h:129