(Probably an overkill, but here it goes)
Contact emails
Explainer
No explainer, a specification exists already.
Spec
Summary
This change corrects a non-compliant type value in the formatToParts implementation.
> new Intl.DateTimeFormat("en-us", {hour12: true, hour: "numeric"}).formatToParts()
[{"type": "hour", "value": "6"}, {"type": "literal", "value": " "}, {"type": "dayperiod", "value": "PM"}]
Will change to -
[{"type": "hour", "value": "6"},
{"type": "literal", "value": " "},
{"type": "dayPeriod", "value": "PM"}]
Motivation
Compliance with the standards and other browsers and likely most of the code that is already out there.
Risks
Interoperability and Compatibility
Compatibility risk - small to medium at worst.
Interoperability risk - none.
Edge: No signals
Firefox: Shipped
Safari: Shipped
Web developers: No signals.
Alternatives for web developers
Either check for type === "dayPeriod" || type === "dayperiod", or type.toLowerCase() === "dayperiod".
Ergonomics
Irrelevant.
Activation
Irrelevant.
Debuggability
Already debuggable.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.
Is this feature fully tested by web-platform-tests?
Nope, but it is tested by test262, though not this case (which is apparently why the interoperability issue exists).
Bug and proposed change list -
https://chromium-review.googlesource.com/c/v8/v8/+/1145304
Link to entry on the feature dashboard
Requesting approval to ship?
Yes. I think so. Do you think a deprecation period is warranted? There is no (public?) use counter for formatToParts.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CABc02_%2B1xEoNvCtuc4ocTw%3DtLmfHmT-z-cFTuiE6YS9Q_MdPqg%40mail.gmail.com.
Guess so, though I am personally not going through with the change if there are any blink-dev reservations. ;)
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CABc02_KEi9ifQ6ExJwzFzYpj29gVvcd90CRX9RyDQrt2X%2BVbEQ%40mail.gmail.com.
--
I misremembered formatToParts as a relatively recent feature, but now I see that the intent I remembered was actually discussing NumberFormat. DateTimeFormat did not seem to have an intent on blink-dev (but I see that it did on v8-users).https://www.chromestatus.com/features/6319456309477376 says it is still behind a flag... Is the MDN article correct in stating that it was supported in Chrome 57 (and confusingly, also behind the flag until Chrome 60)?
Shameless plug - probably a good opportunity to add it to my filtered feed scraper and to my RSS reader -Nevertheless, my intuition (more like a hunch, though) is that this specific field is relatively little used, but I may be wrong (the fact that my locale does not use it probably makes me biased).From seeing all of the polyfills (which already use the standard casing) on GitHub (the search yielded a lot of those), I presumed they are also used by projects, which might mean those projects probably tested their polyfilled implementation as well on Internet Explorer 11 or Safari pre-11, so they would have probably seen the casing issue if they did something with that particular field (Salesforce worked around it, for example).However, there is probably a lot of code that is Chrome only (:(), so...
Is there an option to add a use counter to V8?Is there an existing use counter for formatToParts altogether that I may have missed (or maybe it is internal)?
Apologies for the delay, this got hidden from me due to some gmail filtering issues...comments inline.On Thu, Jul 26, 2018 at 2:14 PM PhistucK <phis...@gmail.com> wrote:I misremembered formatToParts as a relatively recent feature, but now I see that the intent I remembered was actually discussing NumberFormat. DateTimeFormat did not seem to have an intent on blink-dev (but I see that it did on v8-users).https://www.chromestatus.com/features/6319456309477376 says it is still behind a flag... Is the MDN article correct in stating that it was supported in Chrome 57 (and confusingly, also behind the flag until Chrome 60)?Indeed, Chrome 57 looks like the right release (from looking through v8 commits). I've updated that on chromestatus. That is indeed awhile ago.
Shameless plug - probably a good opportunity to add it to my filtered feed scraper and to my RSS reader -Nevertheless, my intuition (more like a hunch, though) is that this specific field is relatively little used, but I may be wrong (the fact that my locale does not use it probably makes me biased).From seeing all of the polyfills (which already use the standard casing) on GitHub (the search yielded a lot of those), I presumed they are also used by projects, which might mean those projects probably tested their polyfilled implementation as well on Internet Explorer 11 or Safari pre-11, so they would have probably seen the casing issue if they did something with that particular field (Salesforce worked around it, for example).However, there is probably a lot of code that is Chrome only (:(), so...Again, it'd be great to get Jungshik's input on this, since he was the one who implemented it.
Is there an option to add a use counter to V8?Is there an existing use counter for formatToParts altogether that I may have missed (or maybe it is internal)?It is possible to add use counters to V8. They need to be plumbed through the API, and then manually updated from V8, so it's more work to add than it is in Blink, but it's doable. Would you be interested in adding such a counter?
Comments inline.☆PhistucKOn Wed, Aug 8, 2018 at 3:29 AM Adam Klein <ad...@chromium.org> wrote:Apologies for the delay, this got hidden from me due to some gmail filtering issues...comments inline.On Thu, Jul 26, 2018 at 2:14 PM PhistucK <phis...@gmail.com> wrote:I misremembered formatToParts as a relatively recent feature, but now I see that the intent I remembered was actually discussing NumberFormat. DateTimeFormat did not seem to have an intent on blink-dev (but I see that it did on v8-users).https://www.chromestatus.com/features/6319456309477376 says it is still behind a flag... Is the MDN article correct in stating that it was supported in Chrome 57 (and confusingly, also behind the flag until Chrome 60)?Indeed, Chrome 57 looks like the right release (from looking through v8 commits). I've updated that on chromestatus. That is indeed awhile ago.Thank you.
Shameless plug - probably a good opportunity to add it to my filtered feed scraper and to my RSS reader -Nevertheless, my intuition (more like a hunch, though) is that this specific field is relatively little used, but I may be wrong (the fact that my locale does not use it probably makes me biased).From seeing all of the polyfills (which already use the standard casing) on GitHub (the search yielded a lot of those), I presumed they are also used by projects, which might mean those projects probably tested their polyfilled implementation as well on Internet Explorer 11 or Safari pre-11, so they would have probably seen the casing issue if they did something with that particular field (Salesforce worked around it, for example).However, there is probably a lot of code that is Chrome only (:(), so...Again, it'd be great to get Jungshik's input on this, since he was the one who implemented it.I agree, it would be great if you pinged Jungshik on Hangouts or something and ask Jungshik to follow this thread...
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKtSNYN28nuD1N1VBCjhae3Dvd9mB%3D--ah9%3DnESzg%3Dju6J%3DfEA%40mail.gmail.com.