Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

formatToParts in browsers (partly) supporting Intl API #260

Open
pkozlowski-opensource opened this issue Dec 19, 2016 · 3 comments
Open

Comments

@pkozlowski-opensource
Copy link

Executing new Intl.DateTimeFormat('en-US').formatToParts(new Date())); in a browser that has native Intl API implementation (Chrome, FFox, ...) results in:

TypeError: (intermediate value).formatToParts is not a function

Would it make sense for this polyffill to monkey-patch the Intl object so new methods like formatToParts can be used in browsers already having Intl API partly implemented? Or is this considered gross?

Is using IntlPolyfill a preferred way to go then?

@pkozlowski-opensource
Copy link
Author

I guess this is related to #242

@caridy
Copy link
Collaborator

caridy commented Dec 19, 2016

yes, that's correct! any help on that direction will be appreciated :)

@icambron
Copy link

icambron commented May 1, 2017

I'm having some trouble imagining how that would work. Would you have to, like, parse the result you got from the native Intl impl?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants