Extend TimeZoneName Option Proposal for Stage 2
Frank Yung-Fong Tang / 譚永鋒
TC39 April 2021 Meeting
April 19-22, 2021
Slide: https://docs.google.com/presentation/d/1eYuygaDvErbftDjg4S6zCYqhaxpEiCyFDDdpjmPaMyo �Repo: https://github.com/tc39/proposal-intl-extend-timezonename/
Motivation / Scope
Extend the timeZoneName option in Intl.DateTimeFormat object to support more formatted options.
Scope / Prior Arts / Underline Supportive Library & Data
Add four new values to TimeZoneName option in Intl.DateTimeFormat: “short”, “long”, “shortOffset”, “longOffset”, “shortWall”, “longWall”
“shortOffset”, “longOffset”
Cbanged
Sample Usage in English Locale
d8> let timeZoneNames = ["short", "long", "shortOffset", "longOffset", "shortWall", "longWall"];
d8> timeZoneNames.forEach(function(timeZoneName) { print((new Date()).toLocaleTimeString("en", {timeZoneName}))});
9:27:14 AM PST
9:27:14 AM Pacific Standard Time
9:27:14 AM GMT-8
9:27:14 AM GMT-08:00
9:27:14 AM PT
9:27:14 AM Pacific Time
Sample Usage in Traditional Chinese Locale (zh-CN)
d8> let timeZoneNames = ["short", "long", "shortOffset", "longOffset", "shortWall", "longWall"];
d8> timeZoneNames.forEach(function(timeZoneName) { print((new Date()).toLocaleTimeString("zh-Hant", {timeZoneName}))});
上午9:27:27 [PST]
上午9:27:27 [太平洋標準時間]
上午9:27:27 [GMT-8]
上午9:27:27 [GMT-08:00]
上午9:27:27 [PT]
上午9:27:27 [太平洋時間]
ECMA-402 Stage 2 & 3 Requirements
Examples of “Wall Time” Usage
Broad Appeal
Concerns about Data Size Increase
Note: Several other possible values of timeZoneName were removed from earlier proposal after we exam the size impact during Stage 0
Payload Mitigation
History
References
Entrance Criteria / Acceptance Signifies�For Stage 2
Entrance Criteria:
Acceptance Signifies:
Requesting the Committee Approval for advancement to Stage 2��Requesting 2 members to serve as Stage 3 Reviewers
Entrance Criteria For Stage 1