ICU-21900 Promote all @draft ICU 69 APIs to @stable ICU 69

This commit is contained in:
Rich Gillam 2022-02-16 17:15:40 -08:00 committed by Peter Edberg
parent 4962050f47
commit 94197b84b8
12 changed files with 68 additions and 116 deletions

View file

@ -326,21 +326,17 @@ ubrk_safeClone(
#endif /* U_HIDE_DEPRECATED_API */
#ifndef U_HIDE_DRAFT_API
/**
* Thread safe cloning operation.
* @param bi iterator to be cloned
* @param status to indicate whether the operation went on smoothly or there were errors
* @return pointer to the new clone
* @draft ICU 69
* @stable ICU 69
*/
U_CAPI UBreakIterator * U_EXPORT2
ubrk_clone(const UBreakIterator *bi,
UErrorCode *status);
#endif // U_HIDE_DRAFT_API
#ifndef U_HIDE_DEPRECATED_API
/**

View file

@ -1229,7 +1229,6 @@ public:
*/
UnicodeSet& retain(UChar32 c);
#ifndef U_HIDE_DRAFT_API
/**
* Retains only the specified string from this set if it is present.
* Upon return this set will be empty if it did not contain s, or
@ -1238,10 +1237,9 @@ public:
*
* @param s the source string
* @return this object, for chaining
* @draft ICU 69
* @stable ICU 69
*/
UnicodeSet& retain(const UnicodeString &s);
#endif // U_HIDE_DRAFT_API
/**
* Removes the specified range from this set if it is present.

View file

@ -628,7 +628,6 @@ uset_removeRange(USet* set, UChar32 start, UChar32 end);
U_CAPI void U_EXPORT2
uset_removeString(USet* set, const UChar* str, int32_t strLen);
#ifndef U_HIDE_DRAFT_API
/**
* Removes EACH of the characters in this string. Note: "ch" == {"c", "h"}
* A frozen set will not be modified.
@ -636,11 +635,10 @@ uset_removeString(USet* set, const UChar* str, int32_t strLen);
* @param set the object to be modified
* @param str the string
* @param length the length of the string, or -1 if NUL-terminated
* @draft ICU 69
* @stable ICU 69
*/
U_CAPI void U_EXPORT2
uset_removeAllCodePoints(USet *set, const UChar *str, int32_t length);
#endif // U_HIDE_DRAFT_API
/**
* Removes from this set all of its elements that are contained in the
@ -671,7 +669,6 @@ uset_removeAll(USet* set, const USet* removeSet);
U_CAPI void U_EXPORT2
uset_retain(USet* set, UChar32 start, UChar32 end);
#ifndef U_HIDE_DRAFT_API
/**
* Retains only the specified string from this set if it is present.
* Upon return this set will be empty if it did not contain s, or
@ -681,7 +678,7 @@ uset_retain(USet* set, UChar32 start, UChar32 end);
* @param set the object to be modified
* @param str the string
* @param length the length of the string, or -1 if NUL-terminated
* @draft ICU 69
* @stable ICU 69
*/
U_CAPI void U_EXPORT2
uset_retainString(USet *set, const UChar *str, int32_t length);
@ -693,11 +690,10 @@ uset_retainString(USet *set, const UChar *str, int32_t length);
* @param set the object to be modified
* @param str the string
* @param length the length of the string, or -1 if NUL-terminated
* @draft ICU 69
* @stable ICU 69
*/
U_CAPI void U_EXPORT2
uset_retainAllCodePoints(USet *set, const UChar *str, int32_t length);
#endif // U_HIDE_DRAFT_API
/**
* Retains only the elements in this set that are contained in the
@ -741,7 +737,6 @@ uset_compact(USet* set);
U_CAPI void U_EXPORT2
uset_complement(USet* set);
#ifndef U_HIDE_DRAFT_API
/**
* Complements the specified range in this set. Any character in
* the range will be removed if it is in this set, or will be
@ -753,7 +748,7 @@ uset_complement(USet* set);
* @param set the object to be modified
* @param start first character, inclusive, of range
* @param end last character, inclusive, of range
* @draft ICU 69
* @stable ICU 69
*/
U_CAPI void U_EXPORT2
uset_complementRange(USet *set, UChar32 start, UChar32 end);
@ -766,7 +761,7 @@ uset_complementRange(USet *set, UChar32 start, UChar32 end);
* @param set the object to be modified
* @param str the string
* @param length the length of the string, or -1 if NUL-terminated
* @draft ICU 69
* @stable ICU 69
*/
U_CAPI void U_EXPORT2
uset_complementString(USet *set, const UChar *str, int32_t length);
@ -778,11 +773,10 @@ uset_complementString(USet *set, const UChar *str, int32_t length);
* @param set the object to be modified
* @param str the string
* @param length the length of the string, or -1 if NUL-terminated
* @draft ICU 69
* @stable ICU 69
*/
U_CAPI void U_EXPORT2
uset_complementAllCodePoints(USet *set, const UChar *str, int32_t length);
#endif // U_HIDE_DRAFT_API
/**
* Complements in this set all elements contained in the specified

View file

@ -152,17 +152,15 @@ public:
virtual void getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial,
AnnualTimeZoneRule*& std, AnnualTimeZoneRule*& dst, UErrorCode& status) const;
#ifndef U_FORCE_HIDE_DRAFT_API
/**
* Get time zone offsets from local wall time.
* @draft ICU 69
* @stable ICU 69
*/
virtual void getOffsetFromLocal(
UDate date, UTimeZoneLocalOption nonExistingTimeOpt,
UTimeZoneLocalOption duplicatedTimeOpt, int32_t& rawOffset,
int32_t& dstOffset, UErrorCode& status) const;
#endif /* U_FORCE_HIDE_DRAFT_API */
#ifndef U_HIDE_INTERNAL_API
/**

View file

@ -77,14 +77,13 @@ enum UMeasureUnitComplexity {
};
#ifndef U_HIDE_DRAFT_API
/**
* Enumeration for SI and binary prefixes, e.g. "kilo-", "nano-", "mebi-".
*
* Enum values should be treated as opaque: use umeas_getPrefixPower() and
* umeas_getPrefixBase() to find their corresponding values.
*
* @draft ICU 69
* @stable ICU 69
* @see umeas_getPrefixBase
* @see umeas_getPrefixPower
*/
@ -96,14 +95,14 @@ typedef enum UMeasurePrefix {
* implementation detail and should not be relied upon: use
* umeas_getPrefixPower() to obtain meaningful values.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_ONE = 30 + 0,
/**
* SI prefix: yotta, 10^24.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_YOTTA = UMEASURE_PREFIX_ONE + 24,
@ -119,133 +118,133 @@ typedef enum UMeasurePrefix {
/**
* SI prefix: zetta, 10^21.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_ZETTA = UMEASURE_PREFIX_ONE + 21,
/**
* SI prefix: exa, 10^18.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_EXA = UMEASURE_PREFIX_ONE + 18,
/**
* SI prefix: peta, 10^15.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_PETA = UMEASURE_PREFIX_ONE + 15,
/**
* SI prefix: tera, 10^12.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_TERA = UMEASURE_PREFIX_ONE + 12,
/**
* SI prefix: giga, 10^9.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_GIGA = UMEASURE_PREFIX_ONE + 9,
/**
* SI prefix: mega, 10^6.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_MEGA = UMEASURE_PREFIX_ONE + 6,
/**
* SI prefix: kilo, 10^3.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_KILO = UMEASURE_PREFIX_ONE + 3,
/**
* SI prefix: hecto, 10^2.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_HECTO = UMEASURE_PREFIX_ONE + 2,
/**
* SI prefix: deka, 10^1.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_DEKA = UMEASURE_PREFIX_ONE + 1,
/**
* SI prefix: deci, 10^-1.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_DECI = UMEASURE_PREFIX_ONE + -1,
/**
* SI prefix: centi, 10^-2.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_CENTI = UMEASURE_PREFIX_ONE + -2,
/**
* SI prefix: milli, 10^-3.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_MILLI = UMEASURE_PREFIX_ONE + -3,
/**
* SI prefix: micro, 10^-6.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_MICRO = UMEASURE_PREFIX_ONE + -6,
/**
* SI prefix: nano, 10^-9.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_NANO = UMEASURE_PREFIX_ONE + -9,
/**
* SI prefix: pico, 10^-12.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_PICO = UMEASURE_PREFIX_ONE + -12,
/**
* SI prefix: femto, 10^-15.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_FEMTO = UMEASURE_PREFIX_ONE + -15,
/**
* SI prefix: atto, 10^-18.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_ATTO = UMEASURE_PREFIX_ONE + -18,
/**
* SI prefix: zepto, 10^-21.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_ZEPTO = UMEASURE_PREFIX_ONE + -21,
/**
* SI prefix: yocto, 10^-24.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_YOCTO = UMEASURE_PREFIX_ONE + -24,
@ -270,7 +269,7 @@ typedef enum UMeasurePrefix {
/**
* Binary prefix: kibi, 1024^1.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_KIBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 1,
@ -286,49 +285,49 @@ typedef enum UMeasurePrefix {
/**
* Binary prefix: mebi, 1024^2.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_MEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 2,
/**
* Binary prefix: gibi, 1024^3.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_GIBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 3,
/**
* Binary prefix: tebi, 1024^4.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_TEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 4,
/**
* Binary prefix: pebi, 1024^5.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_PEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 5,
/**
* Binary prefix: exbi, 1024^6.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_EXBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 6,
/**
* Binary prefix: zebi, 1024^7.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_ZEBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 7,
/**
* Binary prefix: yobi, 1024^8.
*
* @draft ICU 69
* @stable ICU 69
*/
UMEASURE_PREFIX_YOBI = UMEASURE_PREFIX_INTERNAL_ONE_BIN + 8,
@ -347,7 +346,7 @@ typedef enum UMeasurePrefix {
* base is 10 for SI prefixes (kilo, micro) and 1024 for binary prefixes (kibi,
* mebi).
*
* @draft ICU 69
* @stable ICU 69
*/
U_CAPI int32_t U_EXPORT2 umeas_getPrefixBase(UMeasurePrefix unitPrefix);
@ -355,12 +354,10 @@ U_CAPI int32_t U_EXPORT2 umeas_getPrefixBase(UMeasurePrefix unitPrefix);
* Returns the exponent of the factor associated with the given unit prefix, for
* example 3 for kilo, -6 for micro, 1 for kibi, 2 for mebi, 3 for gibi.
*
* @draft ICU 69
* @stable ICU 69
*/
U_CAPI int32_t U_EXPORT2 umeas_getPrefixPower(UMeasurePrefix unitPrefix);
#endif // U_HIDE_DRAFT_API
/**
* A unit such as length, mass, volume, currency, etc. A unit is
* coupled with a numeric amount to produce a Measure.
@ -481,7 +478,6 @@ class U_I18N_API MeasureUnit: public UObject {
*/
UMeasureUnitComplexity getComplexity(UErrorCode& status) const;
#ifndef U_HIDE_DRAFT_API
/**
* Creates a MeasureUnit which is this SINGLE unit augmented with the specified prefix.
* For example, UMEASURE_PREFIX_KILO for "kilo", or UMEASURE_PREFIX_KIBI for "kibi".
@ -494,7 +490,7 @@ class U_I18N_API MeasureUnit: public UObject {
* @param prefix The prefix, from UMeasurePrefix.
* @param status Set if this is not a SINGLE unit or if another error occurs.
* @return A new SINGLE unit.
* @draft ICU 69
* @stable ICU 69
*/
MeasureUnit withPrefix(UMeasurePrefix prefix, UErrorCode& status) const;
@ -510,10 +506,9 @@ class U_I18N_API MeasureUnit: public UObject {
* @return The prefix of this SINGLE unit, from UMeasurePrefix.
* @see umeas_getPrefixBase
* @see umeas_getPrefixPower
* @draft ICU 69
* @stable ICU 69
*/
UMeasurePrefix getPrefix(UErrorCode& status) const;
#endif // U_HIDE_DRAFT_API
/**
* Creates a MeasureUnit which is this SINGLE unit augmented with the specified dimensionality

View file

@ -659,16 +659,14 @@ class U_I18N_API Precision : public UMemory {
*/
static CurrencyPrecision currency(UCurrencyUsage currencyUsage);
#ifndef U_HIDE_DRAFT_API
/**
* Configure how trailing zeros are displayed on numbers. For example, to hide trailing zeros
* when the number is an integer, use UNUM_TRAILING_ZERO_HIDE_IF_WHOLE.
*
* @param trailingZeroDisplay Option to configure the display of trailing zeros.
* @draft ICU 69
* @stable ICU 69
*/
Precision trailingZeroDisplay(UNumberTrailingZeroDisplay trailingZeroDisplay) const;
#endif // U_HIDE_DRAFT_API
private:
enum PrecisionType {
@ -807,7 +805,6 @@ class U_I18N_API Precision : public UMemory {
*/
class U_I18N_API FractionPrecision : public Precision {
public:
#ifndef U_HIDE_DRAFT_API
/**
* Override maximum fraction digits with maximum significant digits depending on the magnitude
* of the number. See UNumberRoundingPriority.
@ -820,13 +817,12 @@ class U_I18N_API FractionPrecision : public Precision {
* How to disambiguate between fraction digits and significant digits.
* @return A precision for chaining or passing to the NumberFormatter precision() setter.
*
* @draft ICU 69
* @stable ICU 69
*/
Precision withSignificantDigits(
int32_t minSignificantDigits,
int32_t maxSignificantDigits,
UNumberRoundingPriority priority) const;
#endif // U_HIDE_DRAFT_API
/**
* Ensure that no less than this number of significant digits are retained when rounding

View file

@ -303,16 +303,14 @@ public:
virtual void getTimeZoneRules(const InitialTimeZoneRule*& initial,
const TimeZoneRule* trsrules[], int32_t& trscount, UErrorCode& status) const override;
#ifndef U_FORCE_HIDE_DRAFT_API
/**
* Get time zone offsets from local wall time.
* @draft ICU 69
* @stable ICU 69
*/
virtual void getOffsetFromLocal(
UDate date, UTimeZoneLocalOption nonExistingTimeOpt,
UTimeZoneLocalOption duplicatedTimeOpt,
int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const override;
#endif /* U_FORCE_HIDE_DRAFT_API */
private:
void deleteRules(void);

View file

@ -620,16 +620,14 @@ public:
virtual void getOffset(UDate date, UBool local, int32_t& rawOffset,
int32_t& dstOffset, UErrorCode& ec) const override;
#ifndef U_FORCE_HIDE_DRAFT_API
/**
* Get time zone offsets from local wall time.
* @draft ICU 69
* @stable ICU 69
*/
virtual void getOffsetFromLocal(
UDate date, UTimeZoneLocalOption nonExistingTimeOpt,
UTimeZoneLocalOption duplicatedTimeOpt,
int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const override;
#endif /* U_FORCE_HIDE_DRAFT_API */
/**
* Returns the TimeZone's raw GMT offset (i.e., the number of milliseconds to add

View file

@ -1617,25 +1617,23 @@ U_CAPI int32_t U_EXPORT2
ucal_getTimeZoneIDForWindowsID(const UChar* winid, int32_t len, const char* region,
UChar* id, int32_t idCapacity, UErrorCode* status);
#ifndef U_FORCE_HIDE_DRAFT_API
/**
* Options used by ucal_getTimeZoneOffsetFromLocal and BasicTimeZone::getOffsetFromLocal()
* to specify how to interpret an input time when it does not exist, or when it is ambiguous,
* around a time zone transition.
* @draft ICU 69
* @stable ICU 69
*/
enum UTimeZoneLocalOption {
#ifndef U_HIDE_DRAFT_API
/**
* An input time is always interpreted as local time before
* a time zone transition.
* @draft ICU 69
* @stable ICU 69
*/
UCAL_TZ_LOCAL_FORMER = 0x04,
/**
* An input time is always interpreted as local time after
* a time zone transition.
* @draft ICU 69
* @stable ICU 69
*/
UCAL_TZ_LOCAL_LATTER = 0x0C,
/**
@ -1644,7 +1642,7 @@ enum UTimeZoneLocalOption {
* sides of a time zone transition are standard time,
* or daylight saving time, the local time before the
* transition is used.
* @draft ICU 69
* @stable ICU 69
*/
UCAL_TZ_LOCAL_STANDARD_FORMER = UCAL_TZ_LOCAL_FORMER | 0x01,
/**
@ -1653,7 +1651,7 @@ enum UTimeZoneLocalOption {
* sides of a time zone transition are standard time,
* or daylight saving time, the local time after the
* transition is used.
* @draft ICU 69
* @stable ICU 69
*/
UCAL_TZ_LOCAL_STANDARD_LATTER = UCAL_TZ_LOCAL_LATTER | 0x01,
/**
@ -1662,7 +1660,7 @@ enum UTimeZoneLocalOption {
* sides of a time zone transition are standard time,
* or daylight saving time, the local time before the
* transition is used.
* @draft ICU 69
* @stable ICU 69
*/
UCAL_TZ_LOCAL_DAYLIGHT_FORMER = UCAL_TZ_LOCAL_FORMER | 0x03,
/**
@ -1671,19 +1669,11 @@ enum UTimeZoneLocalOption {
* sides of a time zone transition are standard time,
* or daylight saving time, the local time after the
* transition is used.
* @draft ICU 69
* @stable ICU 69
*/
UCAL_TZ_LOCAL_DAYLIGHT_LATTER = UCAL_TZ_LOCAL_LATTER | 0x03,
#else /* U_HIDE_DRAFT_API */
/**
* Dummy value to prevent empty enum if U_HIDE_DRAFT_API.
* This will go away when draft conditionals are removed.
* @internal
*/
UCAL_TZ_LOCAL_NONE = 0,
#endif /* U_HIDE_DRAFT_API */
};
typedef enum UTimeZoneLocalOption UTimeZoneLocalOption; /**< @draft ICU 69 */
typedef enum UTimeZoneLocalOption UTimeZoneLocalOption; /**< @stable ICU 69 */
/**
* Returns the time zone raw and GMT offset for the given moment
@ -1710,7 +1700,7 @@ typedef enum UTimeZoneLocalOption UTimeZoneLocalOption; /**< @draft ICU 69 */
* typically one hour.
* If the status is set to one of the error code, the value set is unspecified.
* @param status A pointer to a UErrorCode to receive any errors.
* @draft ICU 69
* @stable ICU 69
*/
U_CAPI void U_EXPORT2
ucal_getTimeZoneOffsetFromLocal(
@ -1718,7 +1708,6 @@ ucal_getTimeZoneOffsetFromLocal(
UTimeZoneLocalOption nonExistingTimeOpt,
UTimeZoneLocalOption duplicatedTimeOpt,
int32_t* rawOffset, int32_t* dstOffset, UErrorCode* status);
#endif /* U_FORCE_HIDE_DRAFT_API */
#endif /* #if !UCONFIG_NO_FORMATTING */

View file

@ -303,23 +303,21 @@ typedef enum UNumberFormatRoundingMode {
* @stable ICU 4.8
*/
UNUM_ROUND_UNNECESSARY,
#ifndef U_HIDE_DRAFT_API
/**
* Rounds ties toward the odd number.
* @draft ICU 69
* @stable ICU 69
*/
UNUM_ROUND_HALF_ODD,
/**
* Rounds ties toward +.
* @draft ICU 69
* @stable ICU 69
*/
UNUM_ROUND_HALF_CEILING,
/**
* Rounds ties toward -.
* @draft ICU 69
* @stable ICU 69
*/
UNUM_ROUND_HALF_FLOOR,
#endif // U_HIDE_DRAFT_API
} UNumberFormatRoundingMode;
/** The possible number format pad positions.

View file

@ -78,7 +78,6 @@
* </pre>
*/
#ifndef U_FORCE_HIDE_DRAFT_API
/**
* An enum declaring how to resolve conflicts between maximum fraction digits and maximum
* significant digits.
@ -115,24 +114,23 @@
* Here, RELAXED favors Max-Fraction and STRICT favors Max-Significant. Note that this larger
* number caused the two modes to favor the opposite result.
*
* @draft ICU 69
* @stable ICU 69
*/
typedef enum UNumberRoundingPriority {
/**
* Favor greater precision by relaxing one of the rounding constraints.
*
* @draft ICU 69
* @stable ICU 69
*/
UNUM_ROUNDING_PRIORITY_RELAXED,
/**
* Favor adherence to all rounding constraints by producing lower precision.
*
* @draft ICU 69
* @stable ICU 69
*/
UNUM_ROUNDING_PRIORITY_STRICT,
} UNumberRoundingPriority;
#endif // U_FORCE_HIDE_DRAFT_API
/**
* An enum declaring how to render units, including currencies. Example outputs when formatting 123 USD and 123
@ -435,21 +433,19 @@ typedef enum UNumberSignDisplay {
*/
UNUM_SIGN_ACCOUNTING_EXCEPT_ZERO,
#ifndef U_HIDE_DRAFT_API
/**
* Same as AUTO, but do not show the sign on negative zero.
*
* @draft ICU 69
* @stable ICU 69
*/
UNUM_SIGN_NEGATIVE,
/**
* Same as ACCOUNTING, but do not show the sign on negative zero.
*
* @draft ICU 69
* @stable ICU 69
*/
UNUM_SIGN_ACCOUNTING_NEGATIVE,
#endif // U_HIDE_DRAFT_API
// Do not conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
// needed for unconditionalized struct MacroProps
@ -498,31 +494,29 @@ typedef enum UNumberDecimalSeparatorDisplay {
UNUM_DECIMAL_SEPARATOR_COUNT
} UNumberDecimalSeparatorDisplay;
#ifndef U_FORCE_HIDE_DRAFT_API
/**
* An enum declaring how to render trailing zeros.
*
* - UNUM_TRAILING_ZERO_AUTO: 0.90, 1.00, 1.10
* - UNUM_TRAILING_ZERO_HIDE_IF_WHOLE: 0.90, 1, 1.10
*
* @draft ICU 69
* @stable ICU 69
*/
typedef enum UNumberTrailingZeroDisplay {
/**
* Display trailing zeros according to the settings for minimum fraction and significant digits.
*
* @draft ICU 69
* @stable ICU 69
*/
UNUM_TRAILING_ZERO_AUTO,
/**
* Same as AUTO, but hide trailing zeros after the decimal separator if they are all zero.
*
* @draft ICU 69
* @stable ICU 69
*/
UNUM_TRAILING_ZERO_HIDE_IF_WHOLE,
} UNumberTrailingZeroDisplay;
#endif // U_FORCE_HIDE_DRAFT_API
struct UNumberFormatter;
/**

View file

@ -264,16 +264,14 @@ public:
virtual void getOffset(UDate date, UBool local, int32_t& rawOffset,
int32_t& dstOffset, UErrorCode& ec) const override;
#ifndef U_FORCE_HIDE_DRAFT_API
/**
* Get time zone offsets from local wall time.
* @draft ICU 69
* @stable ICU 69
*/
virtual void getOffsetFromLocal(
UDate date, UTimeZoneLocalOption nonExistingTimeOpt,
UTimeZoneLocalOption duplicatedTimeOpt,
int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const override;
#endif /* U_FORCE_HIDE_DRAFT_API */
/**
* Sets the TimeZone's raw GMT offset (i.e., the number of milliseconds to add