ICU 52.1  52.1
udat.h
Go to the documentation of this file.
1 /*
2  *******************************************************************************
3  * Copyright (C) 1996-2013, 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 
192 
193 /* Skeletons for dates. */
194 
199 #define UDAT_YEAR "y"
200 #ifndef U_HIDE_DRAFT_API
201 
205 #define UDAT_QUARTER "QQQQ"
206 
210 #define UDAT_ABBR_QUARTER "QQQ"
211 #endif /* U_HIDE_DRAFT_API */
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 #ifndef U_HIDE_DRAFT_API
276 
280 #define UDAT_WEEKDAY "EEEE"
281 
285 #define UDAT_ABBR_WEEKDAY "E"
286 #endif /* U_HIDE_DRAFT_API */
287 
292 #define UDAT_YEAR_MONTH_WEEKDAY_DAY "yMMMMEEEEd"
293 
298 #define UDAT_YEAR_ABBR_MONTH_WEEKDAY_DAY "yMMMEd"
299 
304 #define UDAT_YEAR_NUM_MONTH_WEEKDAY_DAY "yMEd"
305 
310 #define UDAT_MONTH_DAY "MMMMd"
311 
316 #define UDAT_ABBR_MONTH_DAY "MMMd"
317 
322 #define UDAT_NUM_MONTH_DAY "Md"
323 
328 #define UDAT_MONTH_WEEKDAY_DAY "MMMMEEEEd"
329 
334 #define UDAT_ABBR_MONTH_WEEKDAY_DAY "MMMEd"
335 
340 #define UDAT_NUM_MONTH_WEEKDAY_DAY "MEd"
341 
342 /* Skeletons for times. */
343 
348 #define UDAT_HOUR "j"
349 #ifndef U_HIDE_DRAFT_API
350 
354 #define UDAT_HOUR24 "H"
355 
359 #define UDAT_MINUTE "m"
360 #endif /* U_HIDE_DRAFT_API */
361 
366 #define UDAT_HOUR_MINUTE "jm"
367 
372 #define UDAT_HOUR24_MINUTE "Hm"
373 #ifndef U_HIDE_DRAFT_API
374 
378 #define UDAT_SECOND "s"
379 #endif /* U_HIDE_DRAFT_API */
380 
386 #define UDAT_HOUR_MINUTE_SECOND "jms"
387 
393 #define UDAT_HOUR24_MINUTE_SECOND "Hms"
394 
399 #define UDAT_MINUTE_SECOND "ms"
400 
401 /* Skeletons for time zones. */
402 
403 #ifndef U_HIDE_DRAFT_API
404 
411 #define UDAT_LOCATION_TZ "VVVV"
412 
419 #define UDAT_GENERIC_TZ "vvvv"
420 
427 #define UDAT_ABBR_GENERIC_TZ "v"
428 
435 #define UDAT_SPECIFIC_TZ "zzzz"
436 
443 #define UDAT_ABBR_SPECIFIC_TZ "z"
444 
451 #define UDAT_ABBR_UTC_TZ "ZZZZ"
452 #endif /* U_HIDE_DRAFT_API */
453 
454 /* deprecated skeleton constants */
455 
456 #ifndef U_HIDE_DEPRECATED_API
457 
461 #define UDAT_STANDALONE_MONTH "LLLL"
462 
466 #define UDAT_ABBR_STANDALONE_MONTH "LLL"
467 
472 #define UDAT_HOUR_MINUTE_GENERIC_TZ "jmv"
473 
477 #define UDAT_HOUR_MINUTE_TZ "jmz"
478 
482 #define UDAT_HOUR_GENERIC_TZ "jv"
483 
487 #define UDAT_HOUR_TZ "jz"
488 #endif /* U_HIDE_DEPRECATED_API */
489 
495 typedef enum UDateFormatField {
502 
509 
516 
523 
532 
541 
548 
555 
570 
577 
584 
591 
598 
605 
612 
621 
630 
638 
645 
652 
659 
666 
673 
681 
695 
703 
712 
721 
728 
737 
738 #ifndef U_HIDE_DRAFT_API
739 
746 
754 
762 #endif /* U_HIDE_DRAFT_API */
763 
773 
775 
776 
787 
788 
817 U_STABLE UDateFormat* U_EXPORT2
818 udat_open(UDateFormatStyle timeStyle,
819  UDateFormatStyle dateStyle,
820  const char *locale,
821  const UChar *tzID,
822  int32_t tzIDLength,
823  const UChar *pattern,
824  int32_t patternLength,
825  UErrorCode *status);
826 
827 
834 U_STABLE void U_EXPORT2
835 udat_close(UDateFormat* format);
836 
837 
860 
861 #ifndef U_HIDE_INTERNAL_API
862 
872 U_INTERNAL UBool U_EXPORT2
874 
885 U_INTERNAL void U_EXPORT2
887 
888 #endif /* U_HIDE_INTERNAL_API */
889 
890 
891 
892 #if U_SHOW_CPLUSPLUS_API
893 
895 
906 
908 
909 #endif
910 
919 U_STABLE UDateFormat* U_EXPORT2
920 udat_clone(const UDateFormat *fmt,
921  UErrorCode *status);
922 
941 U_STABLE int32_t U_EXPORT2
942 udat_format( const UDateFormat* format,
943  UDate dateToFormat,
944  UChar* result,
945  int32_t resultLength,
946  UFieldPosition* position,
947  UErrorCode* status);
948 
974 U_STABLE UDate U_EXPORT2
975 udat_parse(const UDateFormat* format,
976  const UChar* text,
977  int32_t textLength,
978  int32_t *parsePos,
979  UErrorCode *status);
980 
1002 U_STABLE void U_EXPORT2
1003 udat_parseCalendar(const UDateFormat* format,
1004  UCalendar* calendar,
1005  const UChar* text,
1006  int32_t textLength,
1007  int32_t *parsePos,
1008  UErrorCode *status);
1009 
1019 U_STABLE UBool U_EXPORT2
1020 udat_isLenient(const UDateFormat* fmt);
1021 
1031 U_STABLE void U_EXPORT2
1033  UBool isLenient);
1034 
1044 U_STABLE const UCalendar* U_EXPORT2
1045 udat_getCalendar(const UDateFormat* fmt);
1046 
1056 U_STABLE void U_EXPORT2
1058  const UCalendar* calendarToSet);
1059 
1069 U_STABLE const UNumberFormat* U_EXPORT2
1070 udat_getNumberFormat(const UDateFormat* fmt);
1071 
1081 U_STABLE void U_EXPORT2
1083  const UNumberFormat* numberFormatToSet);
1084 
1094 U_STABLE const char* U_EXPORT2
1095 udat_getAvailable(int32_t localeIndex);
1096 
1105 U_STABLE int32_t U_EXPORT2
1106 udat_countAvailable(void);
1107 
1118 U_STABLE UDate U_EXPORT2
1120  UErrorCode *status);
1121 
1132 U_STABLE void U_EXPORT2
1134  UDate d,
1135  UErrorCode *status);
1136 
1149 U_STABLE int32_t U_EXPORT2
1150 udat_toPattern( const UDateFormat *fmt,
1151  UBool localized,
1152  UChar *result,
1153  int32_t resultLength,
1154  UErrorCode *status);
1155 
1166 U_STABLE void U_EXPORT2
1168  UBool localized,
1169  const UChar *pattern,
1170  int32_t patternLength);
1171 
1202  UDAT_STANDALONE_SHORT_MONTHS,
1203  UDAT_STANDALONE_NARROW_MONTHS,
1219  UDAT_STANDALONE_SHORT_QUARTERS,
1220 #ifndef U_HIDE_DRAFT_API
1221 
1234 #endif /* U_HIDE_DRAFT_API */
1236 
1237 struct UDateFormatSymbols;
1243 
1260 U_STABLE int32_t U_EXPORT2
1261 udat_getSymbols(const UDateFormat *fmt,
1262  UDateFormatSymbolType type,
1263  int32_t symbolIndex,
1264  UChar *result,
1265  int32_t resultLength,
1266  UErrorCode *status);
1267 
1280 U_STABLE int32_t U_EXPORT2
1281 udat_countSymbols( const UDateFormat *fmt,
1282  UDateFormatSymbolType type);
1283 
1299 U_STABLE void U_EXPORT2
1300 udat_setSymbols( UDateFormat *format,
1301  UDateFormatSymbolType type,
1302  int32_t symbolIndex,
1303  UChar *value,
1304  int32_t valueLength,
1305  UErrorCode *status);
1306 
1316 U_STABLE const char* U_EXPORT2
1318  ULocDataLocaleType type,
1319  UErrorCode* status);
1320 
1321 #ifndef U_HIDE_DRAFT_API
1322 
1330 U_DRAFT void U_EXPORT2
1332 
1342 U_DRAFT UDisplayContext U_EXPORT2
1344 
1345 #endif /* U_HIDE_DRAFT_API */
1346 
1347 #ifndef U_HIDE_INTERNAL_API
1348 
1359 U_INTERNAL int32_t U_EXPORT2
1361  UChar *result,
1362  int32_t resultLength,
1363  UErrorCode *status);
1364 
1376 U_INTERNAL int32_t U_EXPORT2
1378  UChar *result,
1379  int32_t resultLength,
1380  UErrorCode *status);
1381 
1394 U_INTERNAL void U_EXPORT2
1396  const UChar *datePattern,
1397  int32_t datePatternLength,
1398  const UChar *timePattern,
1399  int32_t timePatternLength,
1400  UErrorCode *status);
1401 
1406 typedef UDateFormat* (U_EXPORT2 *UDateFormatOpener) (UDateFormatStyle timeStyle,
1407  UDateFormatStyle dateStyle,
1408  const char *locale,
1409  const UChar *tzID,
1410  int32_t tzIDLength,
1411  const UChar *pattern,
1412  int32_t patternLength,
1413  UErrorCode *status);
1414 
1419 U_INTERNAL void U_EXPORT2
1421 
1426 U_INTERNAL UDateFormatOpener U_EXPORT2
1428 #endif /* U_HIDE_INTERNAL_API */
1429 
1430 
1431 #endif /* #if !UCONFIG_NO_FORMATTING */
1432 
1433 #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 &#39;w&#39; field alignment, corresponding to the UCAL_WEEK_OF_...
Definition: udat.h:597
FieldPosition and UFieldPosition selector for &#39;e&#39; field alignment, corresponding to the UCAL_DOW_LOCA...
Definition: udat.h:651
The CLDR-style short weekday names, e.g.
Definition: udat.h:1228
Standalone context versions of months.
Definition: udat.h:1201
UCalendarDateFields
Possible fields in a UCalendar.
Definition: ucal.h:183
UDisplayContext udat_getContext(UDateFormat *fmt, UDisplayContextType type, UErrorCode *status)
Get the formatter&#39;s UDisplayContext value for the specified UDisplayContextType, such as UDISPCTX_TYP...
UBool udat_isLenient(const UDateFormat *fmt)
Determine if an UDateFormat will perform lenient parsing.
The localized characters.
Definition: udat.h:1193
FieldPosition and UFieldPosition selector for &#39;V&#39; field alignment, corresponding to the UCAL_ZONE_OFF...
Definition: udat.h:727
The CLDR-style format &quot;narrow&quot; weekday names, for example &quot;M&quot;.
Definition: udat.h:1199
FieldPosition selector for &quot;Q&quot; field alignment, corresponding to quarters.
Definition: udat.h:711
C API: Calendar.
FieldPosition and UFieldPosition selector for &#39;M&#39; field alignment, corresponding to the UCAL_MONTH fi...
Definition: udat.h:515
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:531
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:1195
void udat_applyPatternRelative(UDateFormat *format, const UChar *datePattern, int32_t datePatternLength, const UChar *timePattern, int32_t timePatternLength, UErrorCode *status)
Set the date &amp; time patterns used by a UDateFormat set for relative date formatting.
Short style.
Definition: udat.h:163
The quarters, for example 1st Quarter.
Definition: udat.h:1214
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 &quot;wide&quot; weekday names.
Definition: udat.h:1205
Long style.
Definition: udat.h:159
FieldPosition selector for &#39;X&#39; field alignment, corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OF...
Definition: udat.h:753
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:1182
#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:858
void udat_setLenient(UDateFormat *fmt, UBool isLenient)
Specify whether an UDateFormat will perform lenient parsing.
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:665
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:853
Bitfield for relative date.
Definition: udat.h:168
FieldPosition and UFieldPosition selector for &#39;D&#39; field alignment, corresponding to the UCAL_DAY_OF_Y...
Definition: udat.h:583
FieldPosition selector for the &quot;q&quot; field alignment, corresponding to stand-alone quarters.
Definition: udat.h:720
FieldPosition and UFieldPosition selector for &#39;u&#39; field alignment, corresponding to the UCAL_EXTENDED...
Definition: udat.h:658
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:694
FieldPosition and UFieldPosition selector for &#39;d&#39; field alignment, corresponding to the UCAL_DATE fie...
Definition: udat.h:522
void udat_close(UDateFormat *format)
Close a UDateFormat.
Full style.
Definition: udat.h:157
FieldPosition and UFieldPosition selector for &#39;Y&#39; field alignment, corresponding to the UCAL_YEAR_WOY...
Definition: udat.h:644
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
FieldPosition and UFieldPosition selector for &#39;F&#39; field alignment, corresponding to the UCAL_DAY_OF_W...
Definition: udat.h:590
UDateFormatSymbolType
The possible types of date format symbols.
Definition: udat.h:1176
The CLDR-style stand-alone &quot;narrow&quot; weekday names.
Definition: udat.h:1212
The month names, for example February.
Definition: udat.h:1180
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
&quot;Smart pointer&quot; definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:290
void * UNumberFormat
A number formatter.
Definition: unum.h:132
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:745
FieldPosition and UFieldPosition selector for &#39;A&#39; field alignment, corresponding to the UCAL_MILLISEC...
Definition: udat.h:672
indicates whether whitespace is allowed.
Definition: udat.h:847
C++ API: &quot;Smart pointers&quot; 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.
void udat_setBooleanAttribute(UDateFormat *fmt, UDateFormatBooleanAttribute attr, UBool, UErrorCode *status)
Set a boolean attribute associated with a UDateFormat.
FieldPosition and UFieldPosition selector for &#39;v&#39; field alignment, corresponding to the UCAL_ZONE_OFF...
Definition: udat.h:687
The era names, for example AD.
Definition: udat.h:1178
FieldPosition and UFieldPosition selector for &#39;W&#39; field alignment, corresponding to the UCAL_WEEK_OF_...
Definition: udat.h:604
The CLDR-style format &quot;wide&quot; weekday names, for example Monday.
Definition: udat.h:1184
UCalendarDateFields udat_toCalendarDateField(UDateFormatField field)
Maps from a UDateFormatField to the corresponding UCalendarDateFields.
struct UDateFormatSymbols UDateFormatSymbols
Date format symbols.
Definition: udat.h:1242
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.
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:576
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:611
&quot;Smart pointer&quot; class, closes a UDateFormat via udat_close().
The short quarter names, for example Q1.
Definition: udat.h:1216
FieldPosition and UFieldPosition selector for &#39;K&#39; field alignment, corresponding to the UCAL_HOUR fie...
Definition: udat.h:629
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.
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:278
#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.
Standalone context versions of quarters.
Definition: udat.h:1218
UDateFormatField
FieldPosition and UFieldPosition selectors for format fields defined by DateFormat and UDateFormat...
Definition: udat.h:495
FieldPosition and UFieldPosition selector for &#39;G&#39; field alignment, corresponding to the UCAL_ERA fiel...
Definition: udat.h:501
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:547
int32_t udat_countSymbols(const UDateFormat *fmt, UDateFormatSymbolType type)
Count the number of particular symbols for an UDateFormat.
The CLDR-style stand-alone &quot;abbreviated&quot; (not &quot;short&quot;) weekday names.
Definition: udat.h:1210
The narrow month names, for example F.
Definition: udat.h:1197
FieldPosition selector for &#39;x&#39; field alignment, corresponding to the UCAL_ZONE_OFFSET and UCAL_DST_OF...
Definition: udat.h:761
FieldPosition and UFieldPosition selector for &#39;s&#39; field alignment, corresponding to the UCAL_SECOND f...
Definition: udat.h:554
Basic definitions for ICU, for both C and C++ APIs.
The CLDR-style format &quot;abbreviated&quot; (not &quot;short&quot;) weekday names, for example &quot;Mon.&quot; For the CLDR-style format &quot;short&quot; weekday names, use UDAT_SHORTER_WEEKDAYS.
Definition: udat.h:1189
FieldPosition and UFieldPosition selector for &#39;z&#39; field alignment, corresponding to the UCAL_ZONE_OFF...
Definition: udat.h:637
FieldPosition and UFieldPosition selector for &#39;y&#39; field alignment, corresponding to the UCAL_YEAR fie...
Definition: udat.h:508
FieldPosition selector for &#39;L&#39; field alignment, corresponding to the UCAL_MONTH field.
Definition: udat.h:702
The AM/PM names, for example AM.
Definition: udat.h:1191
Number of FieldPosition and UFieldPosition selectors for DateFormat and UDateFormat.
Definition: udat.h:772
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:680
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:540
UDateFormatBooleanAttribute
DateFormat boolean attributes.
Definition: udat.h:842
FieldPosition and UFieldPosition selector for &#39;S&#39; field alignment, corresponding to the UCAL_MILLISEC...
Definition: udat.h:569
FieldPosition and UFieldPosition selector for &#39;h&#39; field alignment, corresponding to the UCAL_HOUR fie...
Definition: udat.h:620
UDateFormatOpener udat_unregisterOpener(UDateFormatOpener opener, UErrorCode *status)
Un-Register a provider factory.
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:1406
FieldPosition selector for &quot;U&quot; field alignment, corresponding to cyclic year names.
Definition: udat.h:736
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:200
C API: NumberFormat.
Medium style.
Definition: udat.h:161
Standalone version of UDAT_SHORTER_WEEKDAYS.
Definition: udat.h:1233