/********************************************************************************
-* Copyright (C) 2008-2010, International Business Machines Corporation and
+* Copyright (C) 2008-2012, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*
#include "unicode/dtintrv.h"
#include "unicode/dtitvinf.h"
#include "unicode/dtptngen.h"
+#include "unicode/udateintervalformat.h"
U_NAMESPACE_BEGIN
* "EEE, d MMM, yyyy - EEE, d MMM, yyyy" for year differs,
* "EEE, d MMM - EEE, d MMM, yyyy" for month differs,
* "EEE, d - EEE, d MMM, yyyy" for day differs,
- * @param skeleton the skeleton on which interval format based.
+ * @param skeleton the skeleton on which the interval format is based.
* @param locale the given locale
* @param status output param set to success/failure code on exit
* @return a date time interval formatter which the caller owns.
*/
const DateFormat* getDateFormat(void) const;
+ /**
+ * Returns a reference to the TimeZone used by this DateIntervalFormat's calendar.
+ * @return the time zone associated with the calendar of DateIntervalFormat.
+ * @stable ICU 4.8
+ */
+ virtual const TimeZone& getTimeZone(void) const;
+
+ /**
+ * Sets the time zone for the calendar used by this DateIntervalFormat object. The
+ * caller no longer owns the TimeZone object and should not delete it after this call.
+ * @param zoneToAdopt the TimeZone to be adopted.
+ * @stable ICU 4.8
+ */
+ virtual void adoptTimeZone(TimeZone* zoneToAdopt);
+
+ /**
+ * Sets the time zone for the calendar used by this DateIntervalFormat object.
+ * @param zone the new time zone.
+ * @stable ICU 4.8
+ */
+ virtual void setTimeZone(const TimeZone& zone);
+
+ /**
+ * Change attributes for the DateIntervalFormat object.
+ * @param attr
+ * The attribute to change.
+ * @param value
+ * The new value for the attribute.
+ * @param status
+ * A UErrorCode to receive any errors.
+ * @internal
+ */
+ virtual void setAttribute(UDateIntervalFormatAttribute attr,
+ UDateIntervalFormatAttributeValue value,
+ UErrorCode &status);
+
/**
* Return the class ID for this class. This is useful only for comparing to
* a return value from getDynamicClassID(). For example:
* Caller should not delete them.
*
* @param locale the locale of this date interval formatter.
- * @param dtitvinf the DateIntervalInfo object to be adopted.
+ * @param dtItvInfo the DateIntervalInfo object to be adopted.
* @param skeleton the skeleton of the date formatter
* @param status output param set to success/failure code on exit
* @internal ICU 4.0
*
* @param inputSkeleton the input skeleton
* @param bestMatchSkeleton the best match skeleton
- * @param bestMatchIntervalpattern the best match interval pattern
+ * @param bestMatchIntervalPattern the best match interval pattern
* @param differenceInfo the difference between 2 skeletons
* 1 means only field width differs
* 2 means v/z exchange
*/
void setPatternInfo(UCalendarDateFields field,
const UnicodeString* firstPart,
- const UnicodeString* secondpart,
+ const UnicodeString* secondPart,
UBool laterDateFirst);
DateTimePatternGenerator* fDtpng;
/**
- * Following are interval information relavent (locale) to this formatter.
+ * Following are interval information relevant (locale) to this formatter.
*/
UnicodeString fSkeleton;
PatternInfo fIntervalPatterns[DateIntervalInfo::kIPI_MAX_INDEX];
+
+ /**
+ * Atttributes
+ */
+ int32_t fMinimizeType;
};
inline UBool