| 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[];
|
|
|