| Index: source/i18n/unicode/reldatefmt.h
|
| diff --git a/source/i18n/unicode/reldatefmt.h b/source/i18n/unicode/reldatefmt.h
|
| index 9c2ca59cb92f63d937060c4f2b690fedf9f8ca27..c3350c516c4e6fb79b12c2c5371110506e23d662 100644
|
| --- a/source/i18n/unicode/reldatefmt.h
|
| +++ b/source/i18n/unicode/reldatefmt.h
|
| @@ -1,6 +1,6 @@
|
| /*
|
| *****************************************************************************
|
| -* Copyright (C) 2014, International Business Machines Corporation and
|
| +* Copyright (C) 2014-2015, International Business Machines Corporation and
|
| * others.
|
| * All Rights Reserved.
|
| *****************************************************************************
|
| @@ -24,98 +24,95 @@
|
|
|
| #if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION
|
|
|
| -#ifndef U_HIDE_DRAFT_API
|
| -
|
| /**
|
| * The formatting style
|
| - * @draft ICU 54
|
| + * @stable ICU 54
|
| */
|
| typedef enum UDateRelativeDateTimeFormatterStyle {
|
| -
|
| /**
|
| * Everything spelled out.
|
| - * @draft ICU 54
|
| + * @stable ICU 54
|
| */
|
| UDAT_STYLE_LONG,
|
|
|
| /**
|
| * Abbreviations used when possible.
|
| - * @draft ICU 54
|
| + * @stable ICU 54
|
| */
|
| UDAT_STYLE_SHORT,
|
|
|
| /**
|
| * Use the shortest possible form.
|
| - * @draft ICU 54
|
| + * @stable ICU 54
|
| */
|
| UDAT_STYLE_NARROW,
|
|
|
| /**
|
| * The number of styles.
|
| - * @draft ICU 54
|
| + * @stable ICU 54
|
| */
|
| UDAT_STYLE_COUNT
|
| -} UDateRelativeDateTimeFormatterStyle;
|
| +} UDateRelativeDateTimeFormatterStyle;
|
|
|
| /**
|
| * Represents the unit for formatting a relative date. e.g "in 5 days"
|
| * or "in 3 months"
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| typedef enum UDateRelativeUnit {
|
|
|
| /**
|
| * Seconds
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_RELATIVE_SECONDS,
|
|
|
| /**
|
| * Minutes
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_RELATIVE_MINUTES,
|
|
|
| /**
|
| * Hours
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_RELATIVE_HOURS,
|
|
|
| /**
|
| * Days
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_RELATIVE_DAYS,
|
|
|
| /**
|
| * Weeks
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_RELATIVE_WEEKS,
|
|
|
| /**
|
| * Months
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_RELATIVE_MONTHS,
|
|
|
| /**
|
| * Years
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_RELATIVE_YEARS,
|
|
|
| /**
|
| * Count of items in this enum.
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_RELATIVE_UNIT_COUNT
|
| } UDateRelativeUnit;
|
|
|
| /**
|
| * Represents an absolute unit.
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| typedef enum UDateAbsoluteUnit {
|
|
|
| @@ -123,79 +120,79 @@ typedef enum UDateAbsoluteUnit {
|
| // Saturday.
|
| /**
|
| * Sunday
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_ABSOLUTE_SUNDAY,
|
|
|
| /**
|
| * Monday
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_ABSOLUTE_MONDAY,
|
|
|
| /**
|
| * Tuesday
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_ABSOLUTE_TUESDAY,
|
|
|
| /**
|
| * Wednesday
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_ABSOLUTE_WEDNESDAY,
|
|
|
| /**
|
| * Thursday
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_ABSOLUTE_THURSDAY,
|
|
|
| /**
|
| * Friday
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_ABSOLUTE_FRIDAY,
|
|
|
| /**
|
| * Saturday
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_ABSOLUTE_SATURDAY,
|
|
|
| /**
|
| * Day
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_ABSOLUTE_DAY,
|
|
|
| /**
|
| * Week
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_ABSOLUTE_WEEK,
|
|
|
| /**
|
| * Month
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_ABSOLUTE_MONTH,
|
|
|
| /**
|
| * Year
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_ABSOLUTE_YEAR,
|
|
|
| /**
|
| * Now
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_ABSOLUTE_NOW,
|
|
|
| /**
|
| * Count of items in this enum.
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_ABSOLUTE_UNIT_COUNT
|
| } UDateAbsoluteUnit;
|
| @@ -203,49 +200,49 @@ typedef enum UDateAbsoluteUnit {
|
| /**
|
| * Represents a direction for an absolute unit e.g "Next Tuesday"
|
| * or "Last Tuesday"
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| typedef enum UDateDirection {
|
|
|
| /**
|
| * Two before. Not fully supported in every locale.
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_DIRECTION_LAST_2,
|
|
|
| /**
|
| * Last
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_DIRECTION_LAST,
|
|
|
| /**
|
| * This
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_DIRECTION_THIS,
|
|
|
| /**
|
| * Next
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_DIRECTION_NEXT,
|
|
|
| /**
|
| * Two after. Not fully supported in every locale.
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_DIRECTION_NEXT_2,
|
|
|
| /**
|
| * Plain, which means the absence of a qualifier.
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_DIRECTION_PLAIN,
|
|
|
| /**
|
| * Count of items in this enum.
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UDAT_DIRECTION_COUNT
|
| } UDateDirection;
|
| @@ -326,20 +323,20 @@ class UnicodeString;
|
| *
|
| * The RelativeDateTimeFormatter class is not intended for public subclassing.
|
| *
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| class U_I18N_API RelativeDateTimeFormatter : public UObject {
|
| public:
|
|
|
| /**
|
| * Create RelativeDateTimeFormatter with default locale.
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| RelativeDateTimeFormatter(UErrorCode& status);
|
|
|
| /**
|
| * Create RelativeDateTimeFormatter with given locale.
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| RelativeDateTimeFormatter(const Locale& locale, UErrorCode& status);
|
|
|
| @@ -351,7 +348,7 @@ public:
|
| * It is an error for caller to delete this pointer or change its
|
| * contents after calling this constructor.
|
| * @status Any error is returned here.
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| RelativeDateTimeFormatter(
|
| const Locale& locale, NumberFormat *nfToAdopt, UErrorCode& status);
|
| @@ -369,7 +366,7 @@ public:
|
| * @param capitalizationContext A value from UDisplayContext that pertains to
|
| * capitalization.
|
| * @status Any error is returned here.
|
| - * @draft ICU 54
|
| + * @stable ICU 54
|
| */
|
| RelativeDateTimeFormatter(
|
| const Locale& locale,
|
| @@ -380,20 +377,20 @@ public:
|
|
|
| /**
|
| * Copy constructor.
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| RelativeDateTimeFormatter(const RelativeDateTimeFormatter& other);
|
|
|
| /**
|
| * Assignment operator.
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| RelativeDateTimeFormatter& operator=(
|
| const RelativeDateTimeFormatter& other);
|
|
|
| /**
|
| * Destructor.
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| virtual ~RelativeDateTimeFormatter();
|
|
|
| @@ -410,7 +407,7 @@ public:
|
| * appended
|
| * @param status ICU error code returned here.
|
| * @return appendTo
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UnicodeString& format(
|
| double quantity,
|
| @@ -429,7 +426,7 @@ public:
|
| * no format string is available.
|
| * @param status ICU error code returned here.
|
| * @return appendTo
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UnicodeString& format(
|
| UDateDirection direction,
|
| @@ -447,7 +444,7 @@ public:
|
| * @param appendTo concatenated date and time appended here
|
| * @param status ICU error code returned here.
|
| * @return appendTo
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| UnicodeString& combineDateAndTime(
|
| const UnicodeString& relativeDateString,
|
| @@ -458,23 +455,24 @@ public:
|
| /**
|
| * Returns the NumberFormat this object is using.
|
| *
|
| - * @draft ICU 53
|
| + * @stable ICU 53
|
| */
|
| const NumberFormat& getNumberFormat() const;
|
|
|
| /**
|
| * Returns the capitalization context.
|
| *
|
| - * @draft ICU 54
|
| + * @stable ICU 54
|
| */
|
| UDisplayContext getCapitalizationContext() const;
|
|
|
| /**
|
| * Returns the format style.
|
| *
|
| - * @draft ICU 54
|
| + * @stable ICU 54
|
| */
|
| UDateRelativeDateTimeFormatterStyle getFormatStyle() const;
|
| +
|
| private:
|
| const RelativeDateTimeCacheData* fCache;
|
| const SharedNumberFormat *fNumberFormat;
|
| @@ -492,7 +490,5 @@ private:
|
|
|
| U_NAMESPACE_END
|
|
|
| -#endif /* U_HIDE_DRAFT_API */
|
| -
|
| #endif /* !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION*/
|
| #endif
|
|
|