26#if U_SHOW_CPLUSPLUS_API
95#ifndef U_FORCE_HIDE_DEPRECATED_API
129#ifndef U_HIDE_INTERNAL_API
150#ifndef U_HIDE_DEPRECATED_API
188#if U_SHOW_CPLUSPLUS_API
243 const UChar *skeleton, int32_t length,
244 UChar *bestPattern, int32_t capacity,
279 const UChar *skeleton, int32_t length,
281 UChar *bestPattern, int32_t capacity,
307 const UChar *pattern, int32_t length,
308 UChar *skeleton, int32_t capacity,
337 const UChar *pattern, int32_t length,
338 UChar *baseSkeleton, int32_t capacity,
367 const UChar *pattern, int32_t patternLength,
369 UChar *conflictingPattern, int32_t capacity, int32_t *pLength,
395 const UChar *value, int32_t length);
428 const UChar *value, int32_t length);
476 UChar *fieldName, int32_t capacity,
509 const UChar *dtFormat, int32_t length);
528#if !UCONFIG_NO_FORMATTING
559 const UChar *dateTimeFormat, int32_t length,
605 const UChar *decimal, int32_t length);
646 const UChar *pattern, int32_t patternLength,
647 const UChar *skeleton, int32_t skeletonLength,
648 UChar *dest, int32_t destCapacity,
683 const UChar *pattern, int32_t patternLength,
684 const UChar *skeleton, int32_t skeletonLength,
686 UChar *dest, int32_t destCapacity,
728 const UChar *skeleton, int32_t skeletonLength,
731#if !UCONFIG_NO_FORMATTING
"Smart pointer" class, closes a UDateTimePatternGenerator via udatpg_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.
UDateFormatStyle
The possible date/time format styles.
UDateFormatHourCycle
Hour Cycle.
U_CAPI UEnumeration * udatpg_openSkeletons(const UDateTimePatternGenerator *dtpg, UErrorCode *pErrorCode)
Return a UEnumeration list of all the skeletons in canonical form.
U_CAPI int32_t udatpg_getBestPatternWithOptions(UDateTimePatternGenerator *dtpg, const UChar *skeleton, int32_t length, UDateTimePatternMatchOptions options, UChar *bestPattern, int32_t capacity, UErrorCode *pErrorCode)
Get the best pattern matching the input skeleton.
UDateTimePGDisplayWidth
Field display name width constants for udatpg_getFieldDisplayName().
U_CAPI void udatpg_close(UDateTimePatternGenerator *dtpg)
Close a generator.
U_CAPI const UChar * udatpg_getDateTimeFormat(const UDateTimePatternGenerator *dtpg, int32_t *pLength)
Getter corresponding to setDateTimeFormat.
U_CAPI const UChar * udatpg_getAppendItemFormat(const UDateTimePatternGenerator *dtpg, UDateTimePatternField field, int32_t *pLength)
Getter corresponding to setAppendItemFormat.
void * UDateTimePatternGenerator
Opaque type for a date/time pattern generator object.
U_CAPI const UChar * udatpg_getDecimal(const UDateTimePatternGenerator *dtpg, int32_t *pLength)
Getter corresponding to setDecimal.
U_CAPI void udatpg_setDecimal(UDateTimePatternGenerator *dtpg, const UChar *decimal, int32_t length)
The decimal value is used in formatting fractions of seconds.
U_CAPI UDateTimePatternConflict udatpg_addPattern(UDateTimePatternGenerator *dtpg, const UChar *pattern, int32_t patternLength, UBool override, UChar *conflictingPattern, int32_t capacity, int32_t *pLength, UErrorCode *pErrorCode)
Adds a pattern to the generator.
U_CAPI const UChar * udatpg_getDateTimeFormatForStyle(const UDateTimePatternGenerator *udtpg, UDateFormatStyle style, int32_t *pLength, UErrorCode *pErrorCode)
Getter corresponding to udatpg_setDateTimeFormatForStyle.
U_CAPI void udatpg_setAppendItemFormat(UDateTimePatternGenerator *dtpg, UDateTimePatternField field, const UChar *value, int32_t length)
An AppendItem format is a pattern used to append a field if there is no good match.
U_CAPI int32_t udatpg_getBestPattern(UDateTimePatternGenerator *dtpg, const UChar *skeleton, int32_t length, UChar *bestPattern, int32_t capacity, UErrorCode *pErrorCode)
Get the best pattern matching the input skeleton.
U_CAPI int32_t udatpg_getSkeleton(UDateTimePatternGenerator *unusedDtpg, const UChar *pattern, int32_t length, UChar *skeleton, int32_t capacity, UErrorCode *pErrorCode)
Get a unique skeleton from a given pattern.
UDateTimePatternConflict
Status return values from udatpg_addPattern().
@ UDATPG_CONFLICT_COUNT
One more than the highest normal UDateTimePatternConflict value.
U_CAPI int32_t udatpg_replaceFieldTypes(UDateTimePatternGenerator *dtpg, const UChar *pattern, int32_t patternLength, const UChar *skeleton, int32_t skeletonLength, UChar *dest, int32_t destCapacity, UErrorCode *pErrorCode)
Adjusts the field types (width and subtype) of a pattern to match what is in a skeleton.
U_CAPI UDateTimePatternGenerator * udatpg_openEmpty(UErrorCode *pErrorCode)
Open an empty generator, to be constructed with udatpg_addPattern(...) etc.
U_CAPI void udatpg_setAppendItemName(UDateTimePatternGenerator *dtpg, UDateTimePatternField field, const UChar *value, int32_t length)
Set the name of field, eg "era" in English for ERA.
U_CAPI void udatpg_setDateTimeFormatForStyle(UDateTimePatternGenerator *udtpg, UDateFormatStyle style, const UChar *dateTimeFormat, int32_t length, UErrorCode *pErrorCode)
dateTimeFormats are message patterns used to compose combinations of date and time patterns.
U_CAPI void udatpg_setDateTimeFormat(const UDateTimePatternGenerator *dtpg, const UChar *dtFormat, int32_t length)
The DateTimeFormat is a message format pattern used to compose date and time patterns.
UDateTimePatternMatchOptions
Masks to control forcing the length of specified fields in the returned pattern to match those in the...
@ UDATPG_MATCH_HOUR_FIELD_LENGTH
@ UDATPG_MATCH_MINUTE_FIELD_LENGTH
@ UDATPG_MATCH_SECOND_FIELD_LENGTH
@ UDATPG_MATCH_NO_OPTIONS
@ UDATPG_MATCH_ALL_FIELDS_LENGTH
U_CAPI const UChar * udatpg_getAppendItemName(const UDateTimePatternGenerator *dtpg, UDateTimePatternField field, int32_t *pLength)
Getter corresponding to setAppendItemNames.
U_CAPI UDateFormatHourCycle udatpg_getDefaultHourCycle(const UDateTimePatternGenerator *dtpg, UErrorCode *pErrorCode)
Return the default hour cycle for a locale.
U_CAPI int32_t udatpg_replaceFieldTypesWithOptions(UDateTimePatternGenerator *dtpg, const UChar *pattern, int32_t patternLength, const UChar *skeleton, int32_t skeletonLength, UDateTimePatternMatchOptions options, UChar *dest, int32_t destCapacity, UErrorCode *pErrorCode)
Adjusts the field types (width and subtype) of a pattern to match what is in a skeleton.
U_CAPI int32_t udatpg_getFieldDisplayName(const UDateTimePatternGenerator *dtpg, UDateTimePatternField field, UDateTimePGDisplayWidth width, UChar *fieldName, int32_t capacity, UErrorCode *pErrorCode)
The general interface to get a display name for a particular date/time field, in one of several possi...
U_CAPI int32_t udatpg_getBaseSkeleton(UDateTimePatternGenerator *unusedDtpg, const UChar *pattern, int32_t length, UChar *baseSkeleton, int32_t capacity, UErrorCode *pErrorCode)
Get a unique base skeleton from a given pattern.
U_CAPI UDateTimePatternGenerator * udatpg_open(const char *locale, UErrorCode *pErrorCode)
Open a generator according to a given locale.
U_CAPI UEnumeration * udatpg_openBaseSkeletons(const UDateTimePatternGenerator *dtpg, UErrorCode *pErrorCode)
Return a UEnumeration list of all the base skeletons in canonical form.
U_CAPI const UChar * udatpg_getPatternForSkeleton(const UDateTimePatternGenerator *dtpg, const UChar *skeleton, int32_t skeletonLength, int32_t *pLength)
Get the pattern corresponding to a given skeleton.
U_CAPI UDateTimePatternGenerator * udatpg_clone(const UDateTimePatternGenerator *dtpg, UErrorCode *pErrorCode)
Create a copy pf a generator.
UDateTimePatternField
Field number constants for udatpg_getAppendItemFormats() and similar functions.
@ UDATPG_WEEK_OF_YEAR_FIELD
@ UDATPG_DAY_OF_YEAR_FIELD
@ UDATPG_FRACTIONAL_SECOND_FIELD
@ UDATPG_DAY_OF_WEEK_IN_MONTH_FIELD
@ UDATPG_FIELD_COUNT
One more than the highest normal UDateTimePatternField value.
@ UDATPG_WEEK_OF_MONTH_FIELD
C API: String Enumeration.
struct UEnumeration UEnumeration
structure representing an enumeration object instance
int8_t UBool
The ICU boolean type, a signed-byte integer.
#define U_CAPI
This is used to declare a function as a public ICU C API.
char16_t UChar
The base type for UTF-16 code units and pointers.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.