Skip to content

Commit

Permalink
Bug 1763783 - Part 9: Update ICU draft API guards. r=platform-i18n-re…
Browse files Browse the repository at this point in the history
…viewers,jfkthame

- `UCAL_TZ_LOCAL_FORMER` and `UCAL_TZ_LOCAL_FORMER` are now stable.
- `UNUM_APPROXIMATELY_SIGN_FIELD` is a new draft API.

Depends on D143281

Differential Revision: https://phabricator.services.mozilla.com/D143282
  • Loading branch information
anba committed Apr 9, 2022
1 parent f907ea9 commit dd06e80
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion intl/components/src/NumberFormatFields.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ Maybe<NumberPartType> GetPartTypeForNumberField(UNumberFormatFields fieldName,
return Some(NumberPartType::Unit);
case UNUM_COMPACT_FIELD:
return Some(NumberPartType::Compact);
#if !MOZ_SYSTEM_ICU
#ifndef U_HIDE_DRAFT_API
case UNUM_APPROXIMATELY_SIGN_FIELD:
return Some(NumberPartType::ApproximatelySign);
#endif
Expand Down
5 changes: 0 additions & 5 deletions intl/components/src/TimeZone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,8 @@ Result<int32_t, ICUError> TimeZone::GetUTCOffsetMs(int64_t aLocalMilliseconds) {
// time starts or the time zone offset is increased due to a time zone rule
// change), t_local must be interpreted using the time zone offset before the
// transition.
#ifndef U_HIDE_DRAFT_API
constexpr UTimeZoneLocalOption skippedTime = UCAL_TZ_LOCAL_FORMER;
constexpr UTimeZoneLocalOption repeatedTime = UCAL_TZ_LOCAL_FORMER;
#else
constexpr UTimeZoneLocalOption skippedTime = UTimeZoneLocalOption(0x4);
constexpr UTimeZoneLocalOption repeatedTime = UTimeZoneLocalOption(0x4);
#endif

UDate date = UDate(aLocalMilliseconds);

Expand Down

0 comments on commit dd06e80

Please sign in to comment.