+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
*****************************************************************************
* Copyright (C) 2014-2016, International Business Machines Corporation and
* \brief C++ API: Formats relative dates such as "1 day ago" or "tomorrow"
*/
-#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION
+#if !UCONFIG_NO_FORMATTING
/**
* Represents the unit for formatting a relative date. e.g "in 5 days"
*/
UDAT_RELATIVE_YEARS,
+#ifndef U_HIDE_DEPRECATED_API
/**
- * Count of items in this enum.
- * @stable ICU 53
+ * One more than the highest normal UDateRelativeUnit value.
+ * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
UDAT_RELATIVE_UNIT_COUNT
+#endif // U_HIDE_DEPRECATED_API
} UDateRelativeUnit;
/**
*/
UDAT_ABSOLUTE_NOW,
+#ifndef U_HIDE_DEPRECATED_API
/**
- * Count of items in this enum.
- * @stable ICU 53
+ * One more than the highest normal UDateAbsoluteUnit value.
+ * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
UDAT_ABSOLUTE_UNIT_COUNT
+#endif // U_HIDE_DEPRECATED_API
} UDateAbsoluteUnit;
/**
*/
UDAT_DIRECTION_PLAIN,
+#ifndef U_HIDE_DEPRECATED_API
/**
- * Count of items in this enum.
- * @stable ICU 53
+ * One more than the highest normal UDateDirection value.
+ * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
UDAT_DIRECTION_COUNT
+#endif // U_HIDE_DEPRECATED_API
} UDateDirection;
+#if !UCONFIG_NO_BREAK_ITERATION
+#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
+class BreakIterator;
class RelativeDateTimeCacheData;
class SharedNumberFormat;
class SharedPluralRules;
UnicodeString& appendTo,
UErrorCode& status) const;
-#ifndef U_HIDE_DRAFT_API
/**
* Format a combination of URelativeDateTimeUnit and numeric offset
* using a numeric style, e.g. "1 week ago", "in 1 week",
* appended.
* @param status ICU error code returned here.
* @return appendTo
- * @draft ICU 57
+ * @stable ICU 57
*/
UnicodeString& formatNumeric(
double offset,
* appended.
* @param status ICU error code returned here.
* @return appendTo
- * @draft ICU 57
+ * @stable ICU 57
*/
UnicodeString& format(
double offset,
URelativeDateTimeUnit unit,
UnicodeString& appendTo,
UErrorCode& status) const;
-#endif /* U_HIDE_DRAFT_API */
/**
* Combines a relative date string and a time string in this object's
};
U_NAMESPACE_END
+#endif // U_SHOW_CPLUSPLUS_API
-#endif /* !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION*/
-#endif
+#endif /* !UCONFIG_NO_BREAK_ITERATION */
+#endif /* !UCONFIG_NO_FORMATTING */
+#endif /* __RELDATEFMT_H */