Intl.DateTimeFormat is missing timezone data
See original GitHub issueHello everyone,
Bug/feature
I am not sure if it’s a bug or an intended behavior
What
Intl polyfill is missing timezone data.
The full polyfill could include timezone data or there could be an extra polyfill to add this data
Details
The polyfill in question is here : https://formatjs.io/docs/polyfills/intl-datetimeformat/
for the moment, if we want to have timezone support, for example for Safari, we have to add
import "@formatjs/intl-datetimeformat/add-all-tz"
to our code
Example : User Agent : Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Mobile/15E148 Safari/604.1 Polyfill: https://polyfill.io/v3/polyfill.js?features=Intl
Results :
* Features requested: Intl
*
* - Intl.Locale, License: MIT (required by "Intl.PluralRules.~locale.en", "Intl.PluralRules", "Intl")
* - Intl.PluralRules, License: MIT (required by "Intl.PluralRules.~locale.en", "Intl")
* - Intl.NumberFormat, License: MIT (required by "Intl.NumberFormat.~locale.en", "Intl")
* - Intl.DateTimeFormat, License: MIT (required by "Intl.DateTimeFormat.~locale.en", "Intl")
* - Intl.DateTimeFormat.~locale.en, License: MIT (required by "Intl")
* - Intl.NumberFormat.~locale.en, License: MIT (required by "Intl")
* - Intl.PluralRules.~locale.en, License: MIT (required by "Intl") */
But InitializeDateTimeFormat fails if used with a timezone (any timezone)
I digged a bit in the repo but did not find anything related to this
Not sure how to contribute, but if needed, I’d be glad to help 😃
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (2 by maintainers)
Top GitHub Comments
I’ll see if I can tackle it.
Separate featuring meaning a new addition to the Polyfill for consumption:
??
Hello 😃
yes data is indeed included if you use the localized polyfills, but there might be a bug because __addTzData is never called