Closed Bug 1856291 Opened 2 years ago Closed 2 years ago

Allow UTC offset time zones for the "timeZone" option for Intl.DateTimeFormat

Categories

(Core :: JavaScript: Internationalization API, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
121 Branch
Tracking Status
firefox120 --- wontfix
firefox121 --- fixed

People

(Reporter: anba, Assigned: anba)

References

Details

Attachments

(2 files)

Implement the time zone option changes from https://github.com/tc39/ecma402/issues/683.

Support for system time zones in the time zone offset string format will be added later.

The new self-hosted function TimeZoneOffsetString combines three different
abstract operations, because it's more efficient to parse, validate, and
normalise time zone offset strings in one go. Self-hosted code is currently
restricted to use only Latin-1 permanent atoms, so we can't use the string
literal "\u2212". As a workaround all character accesses and comparisons are
done through character-codes.

When passing time zone offset strings to ICU, the offset must be first changed
into the custom time zone format supported by ICU, which means the offset must
be prepended by the string "GMT".

Depends on D189744

Severity: -- → N/A
Priority: -- → P3
Pushed by andre.bargull@gmail.com: https://hg.mozilla.org/integration/autoland/rev/d482557db536 Part 1: Increase limit for minimum time zone offset. r=dminor https://hg.mozilla.org/integration/autoland/rev/6e473b5825d2 Part 2: Support time zone offset strings from user inputs. r=dminor
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: