| Index: source/i18n/unicode/dtfmtsym.h
|
| diff --git a/source/i18n/unicode/dtfmtsym.h b/source/i18n/unicode/dtfmtsym.h
|
| index bc82f6fc1cd9b691017ea324af8806d0e387fbe8..8010914685f4088fafc45d53f3b69468a38ec62a 100644
|
| --- a/source/i18n/unicode/dtfmtsym.h
|
| +++ b/source/i18n/unicode/dtfmtsym.h
|
| @@ -1,6 +1,6 @@
|
| /*
|
| ********************************************************************************
|
| -* Copyright (C) 1997-2013, International Business Machines
|
| +* Copyright (C) 1997-2014, International Business Machines
|
| * Corporation and others. All Rights Reserved.
|
| ********************************************************************************
|
| *
|
| @@ -76,7 +76,7 @@ class Hashtable;
|
| * locale at least contains any resources that are to be particularized for the
|
| * calendar type.
|
| */
|
| -class U_I18N_API DateFormatSymbols : public UObject {
|
| +class U_I18N_API DateFormatSymbols U_FINAL : public UObject {
|
| public:
|
| /**
|
| * Construct a DateFormatSymbols object by loading format data from
|
| @@ -283,13 +283,11 @@ public:
|
| ABBREVIATED,
|
| WIDE,
|
| NARROW,
|
| -#ifndef U_HIDE_DRAFT_API
|
| /**
|
| * Short width is currently only supported for weekday names.
|
| - * @draft ICU 51
|
| + * @stable ICU 51
|
| */
|
| SHORT,
|
| -#endif /* U_HIDE_DRAFT_API */
|
| /**
|
| */
|
| DT_WIDTH_COUNT = 4
|
| @@ -410,6 +408,59 @@ public:
|
| */
|
| void setAmPmStrings(const UnicodeString* ampms, int32_t count);
|
|
|
| +#ifndef U_HIDE_DRAFT_API
|
| + /**
|
| + * Gets cyclic year name strings if the calendar has them, by width and context.
|
| + * For example: "jia-zi", "yi-chou", etc.
|
| + * @param count Filled in with length of the array.
|
| + * @param context The usage context: FORMAT, STANDALONE.
|
| + * @param width The requested name width: WIDE, ABBREVIATED, NARROW.
|
| + * @return The year name strings (DateFormatSymbols retains ownership),
|
| + * or null if they are not available for this calendar.
|
| + * @draft ICU 54
|
| + */
|
| + const UnicodeString* getYearNames(int32_t& count,
|
| + DtContextType context, DtWidthType width) const;
|
| +
|
| + /**
|
| + * Sets cyclic year name strings by width and context. For example: "jia-zi", "yi-chou", etc.
|
| + *
|
| + * @param yearNames The new cyclic year name strings (not adopted; caller retains ownership).
|
| + * @param count The length of the array.
|
| + * @param context The usage context: FORMAT, STANDALONE (currently only FORMAT is supported).
|
| + * @param width The name width: WIDE, ABBREVIATED, NARROW (currently only ABBREVIATED is supported).
|
| + * @draft ICU 54
|
| + */
|
| + void setYearNames(const UnicodeString* yearNames, int32_t count,
|
| + DtContextType context, DtWidthType width);
|
| +
|
| + /**
|
| + * Gets calendar zodiac name strings if the calendar has them, by width and context.
|
| + * For example: "Rat", "Ox", "Tiger", etc.
|
| + * @param count Filled in with length of the array.
|
| + * @param context The usage context: FORMAT, STANDALONE.
|
| + * @param width The requested name width: WIDE, ABBREVIATED, NARROW.
|
| + * @return The zodiac name strings (DateFormatSymbols retains ownership),
|
| + * or null if they are not available for this calendar.
|
| + * @draft ICU 54
|
| + */
|
| + const UnicodeString* getZodiacNames(int32_t& count,
|
| + DtContextType context, DtWidthType width) const;
|
| +
|
| + /**
|
| + * Sets calendar zodiac name strings by width and context. For example: "Rat", "Ox", "Tiger", etc.
|
| + *
|
| + * @param zodiacNames The new zodiac name strings (not adopted; caller retains ownership).
|
| + * @param count The length of the array.
|
| + * @param context The usage context: FORMAT, STANDALONE (currently only FORMAT is supported).
|
| + * @param width The name width: WIDE, ABBREVIATED, NARROW (currently only ABBREVIATED is supported).
|
| + * @draft ICU 54
|
| + */
|
| + void setZodiacNames(const UnicodeString* zodiacNames, int32_t count,
|
| + DtContextType context, DtWidthType width);
|
| +
|
| +#endif /* U_HIDE_DRAFT_API */
|
| +
|
| #ifndef U_HIDE_INTERNAL_API
|
| /**
|
| * Somewhat temporary constants for leap month pattern types, adequate for supporting
|
| @@ -505,13 +556,16 @@ public:
|
| */
|
| Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const;
|
|
|
| + /* The following type and kCapContextUsageTypeCount cannot be #ifndef U_HIDE_INTERNAL_API,
|
| + they are needed for .h file declarations. */
|
| /**
|
| * Constants for capitalization context usage types.
|
| * @internal
|
| */
|
| enum ECapitalizationContextUsageType
|
| {
|
| - kCapContextUsageOther,
|
| +#ifndef U_HIDE_INTERNAL_API
|
| + kCapContextUsageOther = 0,
|
| kCapContextUsageMonthFormat, /* except narrow */
|
| kCapContextUsageMonthStandalone, /* except narrow */
|
| kCapContextUsageMonthNarrow,
|
| @@ -525,7 +579,8 @@ public:
|
| kCapContextUsageZoneShort,
|
| kCapContextUsageMetazoneLong,
|
| kCapContextUsageMetazoneShort,
|
| - kCapContextUsageTypeCount
|
| +#endif /* U_HIDE_INTERNAL_API */
|
| + kCapContextUsageTypeCount = 14
|
| };
|
|
|
| /**
|
| @@ -686,12 +741,22 @@ private:
|
| int32_t fLeapMonthPatternsCount;
|
|
|
| /**
|
| - * (Format) Short cyclic year names, for example: "jia-zi", "yi-chou", ... "gui-hai"
|
| + * Cyclic year names, for example: "jia-zi", "yi-chou", ... "gui-hai";
|
| + * currently we only have data for format/abbreviated.
|
| + * For the others, just get from format/abbreviated, ignore set.
|
| */
|
| - UnicodeString* fShortYearNames;
|
| + UnicodeString *fShortYearNames;
|
| int32_t fShortYearNamesCount;
|
|
|
| /**
|
| + * Cyclic zodiac names, for example "Rat", "Ox", "Tiger", etc.;
|
| + * currently we only have data for format/abbreviated.
|
| + * For the others, just get from format/abbreviated, ignore set.
|
| + */
|
| + UnicodeString *fShortZodiacNames;
|
| + int32_t fShortZodiacNamesCount;
|
| +
|
| + /**
|
| * Localized names of time zones in this locale. This is a
|
| * two-dimensional array of strings of size n by m,
|
| * where m is at least 5 and up to 7. Each of the n rows is an
|
|
|