/*
*******************************************************************************
-* Copyright (C) 2007-2010, International Business Machines Corporation and *
+* Copyright (C) 2007-2012, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
#if !UCONFIG_NO_FORMATTING
#include "unicode/datefmt.h"
+#include "unicode/smpdtfmt.h"
U_NAMESPACE_BEGIN
* Example:
* DateFormat *fullrelative = DateFormat::createDateInstance(DateFormat::kFullRelative, loc);
*
- * @draft ICU 3.8
+ * @internal ICU 3.8
*/
class RelativeDateFormat : public DateFormat {
// overrides
/**
* Copy constructor.
- * @draft ICU 3.8
+ * @internal ICU 3.8
*/
RelativeDateFormat(const RelativeDateFormat&);
/**
* Assignment operator.
- * @draft ICU 3.8
+ * @internal ICU 3.8
*/
RelativeDateFormat& operator=(const RelativeDateFormat&);
/**
* Destructor.
- * @draft ICU 3.8
+ * @internal ICU 3.8
*/
virtual ~RelativeDateFormat();
* Clone this Format object polymorphically. The caller owns the result and
* should delete it when done.
* @return A copy of the object.
- * @draft ICU 3.8
+ * @internal ICU 3.8
*/
virtual Format* clone(void) const;
* of different subclasses are considered unequal.
* @param other the object to be compared with.
* @return true if the given Format objects are semantically equal.
- * @draft ICU 3.8
+ * @internal ICU 3.8
*/
virtual UBool operator==(const Format& other) const;
* @param pos The formatting position. On input: an alignment field,
* if desired. On output: the offsets of the alignment field.
* @return Reference to 'appendTo' parameter.
- * @draft ICU 3.8
+ * @internal ICU 3.8
*/
virtual UnicodeString& format( Calendar& cal,
UnicodeString& appendTo,
* On output: the offsets of the alignment field.
* @param status Output param filled with success/failure status.
* @return Reference to 'appendTo' parameter.
- * @draft ICU 3.8
+ * @internal ICU 3.8
*/
virtual UnicodeString& format(const Formattable& obj,
UnicodeString& appendTo,
* output, the position at which parsing terminated, or the
* start position if the parse failed.
* @return A valid UDate if the input could be parsed.
- * @draft ICU 3.8
+ * @internal ICU 3.8
*/
virtual void parse( const UnicodeString& text,
Calendar& cal,
* output, the position at which parsing terminated, or the
* start position if the parse failed.
* @return A valid UDate if the input could be parsed.
- * @draft ICU 3.8
+ * @internal ICU 3.8
*/
UDate parse( const UnicodeString& text,
ParsePosition& pos) const;
* @param status Filled in with U_ZERO_ERROR if the parse was successful, and with
* an error value if there was a parse error.
* @return A valid UDate if the input could be parsed.
- * @draft ICU 3.8
+ * @internal ICU 3.8
*/
virtual UDate parse( const UnicodeString& text,
UErrorCode& status) const;
* names and abbreviations, time zone names, AM/PM strings, etc.)
* @return a copy of the date-time formatting data associated
* with this date-time formatter.
- * @internal ICU 4.8 technology preview
+ * @internal ICU 4.8
*/
virtual const DateFormatSymbols* getDateFormatSymbols(void) const;
private:
- DateFormat *fDateFormat; // the held date format
- DateFormat *fTimeFormat; // the held time format
+ SimpleDateFormat *fDateTimeFormatter;
+ UnicodeString fDatePattern;
+ UnicodeString fTimePattern;
MessageFormat *fCombinedFormat; // the {0} {1} format.
UDateFormatStyle fDateStyle;
- UDateFormatStyle fTimeStyle;
Locale fLocale;
int32_t fDayMin; // day id of lowest #
* @param locale Locale of the calendar
* @param status Error code
* @return the newly constructed fCalendar
- * @draft ICU 3.8
+ * @internal ICU 3.8
*/
Calendar* initializeCalendar(TimeZone* adoptZone, const Locale& locale, UErrorCode& status);
* . erived::getStaticClassID()) ...
* </pre>
* @return The class ID for all objects of this class.
- * @draft ICU 3.8
+ * @internal ICU 3.8
*/
U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
* @return The class ID for this object. All objects of a
* given class have the same class ID. Objects of
* other classes have different class IDs.
- * @draft ICU 3.8
+ * @internal ICU 3.8
*/
virtual UClassID getDynamicClassID(void) const;
};