Contact emails [email protected]
<https://mail.google.com/mail/?view=cm&fs=1&tf=1&[email protected]> Spec
https://github.com/tc39/ecma402/files/41759/formatToParts.pdf Summary
Intl.DateTimeFormat.prototype.formatToParts() is scheduled to be added to
the EcmaScript Internationalization API specification (Ecma 402). It adds a
method to format date and time to a list of tokens and their type (e.g.
literal, day, year, month, hour, minute, era, etc). It's implemented and
shipped by Firefox. v8 implemented it behind a flag.
Motivation Formatting different parts of a DateTime string in different
styles (font weight, size, color, etc) is not possible currently because
DateTimeFormat does not offer a way to access individual parts of formatted
DateTime. This API gives back a list of token types and their offsets
making it possible to style different parts differently in an i18n-aware
manner. See https://github.com/tc39/ecma402/issues/30  Interoperability risk
Firefox: Shipped Edge: No public signals Safari: No public signals Web
developers: No signals

spec discussion: https://github.com/tc39/ecma402/issues/30
polyfill:
https://github.com/andyearnshaw/Intl.js/blob/master/src/12.datetimeformat.js

Compatibility risk None. This is a new API. Ongoing technical constraints
*None* Will this feature be supported on all six Blink platforms (Windows,
Mac, Linux, Chrome OS, Android, and Android WebView)? Yes or no. Yes OWP
launch tracking bug https://bugs.chromium.org/p/v8/issues/detail?id=5244 Link
to entry on the Chrome Platform Status
https://www.chromestatus.com/features/6319456309477376 Requesting approval
to ship? *Yes*

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to