Intent to Implement: Add dayPeriod option for Intl.DateTimeFormat

42 views
Skip to first unread message

Frank Tang

unread,
May 22, 2019, 7:11:32 PM5/22/19
to blink-dev, v8-users, v8-...@googlegroups.com, Frank Tang, js...@chromium.org, Frank Yung-Fong Tang, Adam Klein, Nebojša Ćirić, Shane Carr
ft...@chromium.org,js...@chromium.org https://github.com/tc39/ecma402/pull/346 Specification: https://github.com/tc39/ecma402/pull/346 https://github.com/tc39/ecma402/pull/346 No TAG review needed since it is part of TC39 ECMA402 Add dayPeriod option to Intl.DateTimeFormat so the caller can format time such as "7 in the morning", "11 in the morning", "12 noon", "1 in the afternoon", "6 in the evening", "10 at night" (or in Chinese "清晨7時", "上午11時", "中午12時", "下午1時" ,"下午6時" ,"晚上10時") It enhances the Intl.DateTimeFormat API to match what the developer cal already do in C++ and Java by calling ICU and ICU4J. Without this feature, developer need to either format the quarter in the server or ship a set of day period pattern and hour to day period mapping logic from the server to client to perform such task.
low. Firefox: No public signals Edge: No public signals Safari: No public signals Web developers: No signals No increase of data. All required data already build into ICU.
Yes Yes Tests will be added into test262 before we consider shipping it. https://www.chromestatus.com/features/6520669959356416

Adam Klein

unread,
May 23, 2019, 4:31:16 AM5/23/19
to Frank Tang, blink-dev, v8-users, v8-...@googlegroups.com, js...@chromium.org, Frank Yung-Fong Tang, Nebojša Ćirić, Shane Carr
On Thu, May 23, 2019 at 1:11 AM Frank Tang <ft...@chromium.org> wrote:
I'd like to better-understand the ECMA 402 process around small additions like this (and your other email about "quarter"). Will this become a formal proposal (and an attached issue, https://github.com/tc39/ecma402/issues/343) the extent of the specification process for this feature? Is there a "stage" process for these things?

Frank Tang (譚永鋒)

unread,
May 23, 2019, 9:43:11 PM5/23/19
to Adam Klein, Shane Carr, Daniel Ehrenberg, blink-dev, v8-users, v8-...@googlegroups.com, js...@chromium.org, Nebojša Ćirić
On Thu, 23 May 2019 at 01:31, Adam Klein <ad...@chromium.org> wrote:
On Thu, May 23, 2019 at 1:11 AM Frank Tang <ft...@chromium.org> wrote:

I'd like to better-understand the ECMA 402 process around small additions like this (and your other email about "quarter"). Will this become a formal proposal (and an attached issue, https://github.com/tc39/ecma402/issues/343) the extent of the specification process for this feature? Is there a "stage" process for these things?

Thank about this point. I actually brought this issue up to ECMA402 chair sffc@ about should I group them into one proposal or deal with them as separated PR. And Shane also loop in Daniel about this. Shane is following up this too. Some of the changes bigger this one, such as the BigInt / Intl.NumberFormat  support went through as a PR and this is not really a "big new feature" but rather some minor improvement on pre-existing API so I try to follow the same track. There are several issues all independent from each other and group them together into one proposal might create unnecessary dependency (for example, the week of year and week of month has CLDR/ ICU issues which will take a much longer time to address) and propose each one of them as individual proposal (so there will be 4) seems too much. 

Regards,
Frank
 
Specification: https://github.com/tc39/ecma402/pull/346 https://github.com/tc39/ecma402/pull/346 No TAG review needed since it is part of TC39 ECMA402 Add dayPeriod option to Intl.DateTimeFormat so the caller can format time such as "7 in the morning", "11 in the morning", "12 noon", "1 in the afternoon", "6 in the evening", "10 at night" (or in Chinese "清晨7時", "上午11時", "中午12時", "下午1時" ,"下午6時" ,"晚上10時") It enhances the Intl.DateTimeFormat API to match what the developer cal already do in C++ and Java by calling ICU and ICU4J. Without this feature, developer need to either format the quarter in the server or ship a set of day period pattern and hour to day period mapping logic from the server to client to perform such task.
low. Firefox: No public signals Edge: No public signals Safari: No public signals Web developers: No signals No increase of data. All required data already build into ICU.
Yes Yes Tests will be added into test262 before we consider shipping it. https://www.chromestatus.com/features/6520669959356416


--
Frank Yung-Fong Tang
譚永鋒 / 🌭🍊 
Sr. Software Engineer 

Shane Carr

unread,
May 24, 2019, 12:39:23 AM5/24/19
to Frank Tang (譚永鋒), Adam Klein, Daniel Ehrenberg, blink-dev, v8-users, v8-...@googlegroups.com, js...@chromium.org, Nebojša Ćirić
We have a history of PRs in ECMA 402 for "small" changes.  Here is a list:


The PRs often involve changes to reflect web reality / ICU behavior.  We are discussing with the ECMA 402 editors on how we want to handle Frank's work, as a PR or as a staged proposal.  I am leaning toward PR because this is only extending an existing API schema (Intl.DateFormat) in a way that is fully consistent with other options in that schema.

Shane

Adam Klein

unread,
May 24, 2019, 3:49:48 AM5/24/19
to v8-...@googlegroups.com, Frank Tang (譚永鋒), Daniel Ehrenberg, blink-dev, v8-users, Nebojša Ćirić, Jungshik Shin
Thanks for the background. For blink-dev's purposes, I'm less concerned about the underlying spec process (if these seem small enough to the domain experts, I'll mostly defer to them). But it would still be nice to have a short "explainer" even for small changes like this; a PR or Github issue by itself isn't well-formatted for understanding the current state, the use case for the new feature, etc. Not sure where that would go; perhaps a gist attached to the PR would be the easiest thing. How does something like that sound to 402 folks?

--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/CABxsp%3DnvZ1VQ0AQf4ri85QEQBJOxHtsAPUd5r%2ByW%2BaqBr2x3eA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Frank Tang (譚永鋒)

unread,
May 24, 2019, 1:09:23 PM5/24/19
to Adam Klein, v8-...@googlegroups.com, Daniel Ehrenberg, blink-dev, v8-users, Nebojša Ćirić, Jungshik Shin
On Fri, 24 May 2019 at 00:49, Adam Klein <ad...@chromium.org> wrote:
Thanks for the background. For blink-dev's purposes, I'm less concerned about the underlying spec process (if these seem small enough to the domain experts, I'll mostly defer to them). But it would still be nice to have a short "explainer" even for small changes like this; a PR or Github issue by itself isn't well-formatted for understanding the current state, the use case for the new feature, etc. Not sure where that would go; perhaps a gist attached to the PR would be the easiest thing. How does something like that sound to 402 folks?

oh. I see. Sure I can work on that to put a one pager public doc under my ft...@chromium.org account together. Will send you shortly.

Frank Tang (譚永鋒)

unread,
May 24, 2019, 1:33:33 PM5/24/19
to Adam Klein, v8-...@googlegroups.com, Daniel Ehrenberg, blink-dev, Nebojša Ćirić, Jungshik Shin (신정식, 申政湜)
On Fri, 24 May 2019 at 10:09, Frank Tang (譚永鋒) <ft...@google.com> wrote:


On Fri, 24 May 2019 at 00:49, Adam Klein <ad...@chromium.org> wrote:
Thanks for the background. For blink-dev's purposes, I'm less concerned about the underlying spec process (if these seem small enough to the domain experts, I'll mostly defer to them). But it would still be nice to have a short "explainer" even for small changes like this; a PR or Github issue by itself isn't well-formatted for understanding the current state, the use case for the new feature, etc. Not sure where that would go; perhaps a gist attached to the PR would be the easiest thing. How does something like that sound to 402 folks?

oh. I see. Sure I can work on that to put a one pager public doc under my ft...@chromium.org account together. Will send you shortly.
Here you go  shorturl.at/coMOY 

Shane Carr

unread,
May 24, 2019, 2:19:44 PM5/24/19
to Frank Tang (譚永鋒), Adam Klein, Daniel Ehrenberg, blink-dev, v8-users, v8-...@googlegroups.com, js...@chromium.org, Nebojša Ćirić
Leo agreed that this change makes sense to propose as a PR.  As usual, we will include it in the ECMA 402 update at TC39, which will be the opportunity for plenary members to voice concerns over this path.

Shane

Reply all
Reply to author
Forward
0 new messages