Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1192)

Unified Diff: source/i18n/unicode/dtfmtsym.h

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/i18n/unicode/decimfmt.h ('k') | source/i18n/unicode/dtitvfmt.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/unicode/dtfmtsym.h
diff --git a/source/i18n/unicode/dtfmtsym.h b/source/i18n/unicode/dtfmtsym.h
index 8010914685f4088fafc45d53f3b69468a38ec62a..bfdf1148acc8a7965d4a7f67695c218754e41ec8 100644
--- a/source/i18n/unicode/dtfmtsym.h
+++ b/source/i18n/unicode/dtfmtsym.h
@@ -1,6 +1,6 @@
/*
********************************************************************************
-* Copyright (C) 1997-2014, International Business Machines
+* Copyright (C) 1997-2015, International Business Machines
* Corporation and others. All Rights Reserved.
********************************************************************************
*
@@ -408,8 +408,39 @@ public:
*/
void setAmPmStrings(const UnicodeString* ampms, int32_t count);
+#ifndef U_HIDE_INTERNAL_API
+ /**
+ * This default time separator is used for formatting when the locale
+ * doesn't specify any time separator, and always recognized when parsing.
+ * @internal
+ */
+ static const UChar DEFAULT_TIME_SEPARATOR = 0x003a; // ':'
+
+ /**
+ * This alternate time separator is always recognized when parsing.
+ * @internal
+ */
+ static const UChar ALTERNATE_TIME_SEPARATOR = 0x002e; // '.'
+#endif /* U_HIDE_INTERNAL_API */
+
#ifndef U_HIDE_DRAFT_API
/**
+ * Gets the time separator string. For example: ":".
+ * @param result Output param which will receive the time separator string.
+ * @return A reference to 'result'.
+ * @draft ICU 55
+ */
+ UnicodeString& getTimeSeparatorString(UnicodeString& result) const;
+
+ /**
+ * Sets the time separator string. For example: ":".
+ * @param newTimeSeparator the new time separator string.
+ * @draft ICU 55
+ */
+ void setTimeSeparatorString(const UnicodeString& newTimeSeparator);
+#endif /* 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.
@@ -417,7 +448,7 @@ public:
* @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
+ * @stable ICU 54
*/
const UnicodeString* getYearNames(int32_t& count,
DtContextType context, DtWidthType width) const;
@@ -429,7 +460,7 @@ public:
* @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
+ * @stable ICU 54
*/
void setYearNames(const UnicodeString* yearNames, int32_t count,
DtContextType context, DtWidthType width);
@@ -442,7 +473,7 @@ public:
* @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
+ * @stable ICU 54
*/
const UnicodeString* getZodiacNames(int32_t& count,
DtContextType context, DtWidthType width) const;
@@ -454,13 +485,11 @@ public:
* @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
+ * @stable 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
@@ -711,6 +740,17 @@ private:
int32_t fAmPmsCount;
/**
+ * Narrow Ampm strings. For example: "a" and "p".
+ */
+ UnicodeString* fNarrowAmPms;
+ int32_t fNarrowAmPmsCount;
+
+ /**
+ * Time separator string. For example: ":".
+ */
+ UnicodeString fTimeSeparator;
+
+ /**
* Quarter strings. For example: "1st quarter", "2nd quarter", etc.
*/
UnicodeString *fQuarters;
@@ -902,6 +942,22 @@ 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);
+public:
+#ifndef U_HIDE_INTERNAL_API
+ /**
+ * Gets a DateFormatSymbols by locale.
+ * Unlike the constructors which always use gregorian calendar, this
+ * method uses the calendar in the locale. If the locale contains no
+ * explicit calendar, this method uses the default calendar for that
+ * locale.
+ * @param locale the locale.
+ * @param status error returned here.
+ * @return the new DateFormatSymbols which the caller owns.
+ * @internal For ICU use only.
+ */
+ static DateFormatSymbols * U_EXPORT2 createForLocale(
+ const Locale &locale, UErrorCode &status);
+#endif /* U_HIDE_INTERNAL_API */
};
U_NAMESPACE_END
« no previous file with comments | « source/i18n/unicode/decimfmt.h ('k') | source/i18n/unicode/dtitvfmt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698