X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/a62d09fcbc8ca9da27887e04112ec143e19b1caf..1a147d096ae81f4c8262f7bfc56bd19fc2dee932:/icuSources/i18n/unicode/dtfmtsym.h diff --git a/icuSources/i18n/unicode/dtfmtsym.h b/icuSources/i18n/unicode/dtfmtsym.h index cc33f75e..c2c12dab 100644 --- a/icuSources/i18n/unicode/dtfmtsym.h +++ b/icuSources/i18n/unicode/dtfmtsym.h @@ -1,3 +1,5 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html /* ******************************************************************************** * Copyright (C) 1997-2016, International Business Machines @@ -23,6 +25,7 @@ #if !UCONFIG_NO_FORMATTING #include "unicode/calendar.h" +#include "unicode/strenum.h" #include "unicode/uobject.h" #include "unicode/locid.h" #include "unicode/udat.h" @@ -33,6 +36,7 @@ * \brief C++ API: Symbols for formatting dates. */ +#if U_SHOW_CPLUSPLUS_API U_NAMESPACE_BEGIN /* forward declaration */ @@ -270,9 +274,15 @@ public: * @stable ICU 3.6 */ enum DtContextType { - FORMAT, - STANDALONE, - DT_CONTEXT_COUNT + FORMAT, + STANDALONE, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal DtContextType value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + DT_CONTEXT_COUNT +#endif // U_HIDE_DEPRECATED_API }; /** @@ -280,17 +290,21 @@ public: * @stable ICU 3.6 */ enum DtWidthType { - ABBREVIATED, - WIDE, - NARROW, - /** - * Short width is currently only supported for weekday names. - * @stable ICU 51 - */ - SHORT, - /** - */ - DT_WIDTH_COUNT = 4 + ABBREVIATED, + WIDE, + NARROW, + /** + * Short width is currently only supported for weekday names. + * @stable ICU 51 + */ + SHORT, +#ifndef U_HIDE_DEPRECATED_API + /** + * One more than the highest normal DtWidthType value. + * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. + */ + DT_WIDTH_COUNT = 4 +#endif // U_HIDE_DEPRECATED_API }; /** @@ -414,13 +428,13 @@ public: * doesn't specify any time separator, and always recognized when parsing. * @internal */ - static const UChar DEFAULT_TIME_SEPARATOR = 0x003a; // ':' + static const char16_t DEFAULT_TIME_SEPARATOR = 0x003a; // ':' /** * This alternate time separator is always recognized when parsing. * @internal */ - static const UChar ALTERNATE_TIME_SEPARATOR = 0x002e; // '.' + static const char16_t ALTERNATE_TIME_SEPARATOR = 0x002e; // '.' /** * Gets the time separator string. For example: ":". @@ -554,7 +568,7 @@ public: * @return the non-localized date-time pattern characters * @stable ICU 2.0 */ - static const UChar * U_EXPORT2 getPatternUChars(void); + static const char16_t * U_EXPORT2 getPatternUChars(void); /** * Gets localized date-time pattern characters. For example: 'u', 't', etc. @@ -965,7 +979,7 @@ private: * Returns the date format field index of the pattern character c, * or UDAT_FIELD_COUNT if c is not a pattern character. */ - static UDateFormatField U_EXPORT2 getPatternCharIndex(UChar c); + static UDateFormatField U_EXPORT2 getPatternCharIndex(char16_t c); /** * Returns TRUE if f (with its pattern character repeated count times) is a numeric field. @@ -975,7 +989,7 @@ private: /** * Returns TRUE if c (repeated count times) is the pattern character for a numeric field. */ - static UBool U_EXPORT2 isNumericPatternChar(UChar c, int32_t count); + static UBool U_EXPORT2 isNumericPatternChar(char16_t c, int32_t count); public: #ifndef U_HIDE_INTERNAL_API /** @@ -1011,6 +1025,7 @@ DateFormatSymbols::capitalizeForUsage(DateFormatSymbols::ECapitalizationContextU } U_NAMESPACE_END +#endif // U_SHOW_CPLUSPLUS_API #endif /* #if !UCONFIG_NO_FORMATTING */