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

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

Issue 2440913002: Update ICU to 58.1
Patch Set: Created 4 years, 2 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/dtfmtsym.h ('k') | source/i18n/unicode/dtitvinf.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/unicode/dtitvfmt.h
diff --git a/source/i18n/unicode/dtitvfmt.h b/source/i18n/unicode/dtitvfmt.h
index d163bad60f4c127bd382f171667fa5e9b23e25c7..68360b87dffaf5ba234400d0f52325707c4b635c 100644
--- a/source/i18n/unicode/dtitvfmt.h
+++ b/source/i18n/unicode/dtitvfmt.h
@@ -1,5 +1,7 @@
+// Copyright (C) 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/********************************************************************************
-* Copyright (C) 2008-2013,2015, International Business Machines Corporation and
+* Copyright (C) 2008-2016, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*
@@ -504,7 +506,13 @@ public:
/**
- * Gets the date formatter
+ * Gets the date formatter. The DateIntervalFormat instance continues to own
+ * the returned DateFormatter object, and will use and possibly modify it
+ * during format operations. In a multi-threaded environment, the returned
+ * DateFormat can only be used if it is certain that no other threads are
+ * concurrently using this DateIntervalFormatter, even for nominally const
+ * functions.
+ *
* @return the date formatter associated with this date interval formatter.
* @stable ICU 4.0
*/
@@ -609,7 +617,7 @@ private:
/**
* default constructor
- * @internal ICU 4.0
+ * @internal (private)
*/
DateIntervalFormat();
@@ -685,6 +693,8 @@ private:
* The full pattern used in this fall-back format is the
* full pattern of the date formatter.
*
+ * gFormatterMutex must already be locked when calling this function.
+ *
* @param fromCalendar calendar set to the from date in date interval
* to be formatted into date interval string
* @param toCalendar calendar set to the to date in date interval
@@ -697,6 +707,7 @@ private:
* On output: the offsets of the alignment field.
* @param status output param set to success/failure code on exit
* @return Reference to 'appendTo' parameter.
+ * @internal (private)
*/
UnicodeString& fallbackFormat(Calendar& fromCalendar,
Calendar& toCalendar,
@@ -952,6 +963,37 @@ private:
const UnicodeString* secondPart,
UBool laterDateFirst);
+ /**
+ * Format 2 Calendars to produce a string.
+ * Implementation of the similar public format function.
+ * Must be called with gFormatterMutex already locked.
+ *
+ * Note: "fromCalendar" and "toCalendar" are not const,
+ * since calendar is not const in SimpleDateFormat::format(Calendar&),
+ *
+ * @param fromCalendar calendar set to the from date in date interval
+ * to be formatted into date interval string
+ * @param toCalendar calendar set to the to date in date interval
+ * to be formatted into date interval string
+ * @param appendTo Output parameter to receive result.
+ * Result is appended to existing contents.
+ * @param fieldPosition On input: an alignment field, if desired.
+ * On output: the offsets of the alignment field.
+ * There may be multiple instances of a given field type
+ * in an interval format; in this case the fieldPosition
+ * offsets refer to the first instance.
+ * @param status Output param filled with success/failure status.
+ * Caller needs to make sure it is SUCCESS
+ * at the function entrance
+ * @return Reference to 'appendTo' parameter.
+ * @internal (private)
+ */
+ UnicodeString& formatImpl(Calendar& fromCalendar,
+ Calendar& toCalendar,
+ UnicodeString& appendTo,
+ FieldPosition& fieldPosition,
+ UErrorCode& status) const ;
+
// from calendar field to pattern letter
static const UChar fgCalendarFieldToPatternLetter[];
« no previous file with comments | « source/i18n/unicode/dtfmtsym.h ('k') | source/i18n/unicode/dtitvinf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698