Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome < 71, iOS safari 13 does not have Intl.RelativeTimeFormat #426

Closed
MrOrz opened this issue Apr 11, 2021 · 0 comments · Fixed by #428
Closed

Chrome < 71, iOS safari 13 does not have Intl.RelativeTimeFormat #426

MrOrz opened this issue Apr 11, 2021 · 0 comments · Fixed by #428

Comments

@MrOrz
Copy link
Member

MrOrz commented Apr 11, 2021

iOS safari 14 works fine. However in v13:

image

Also for Chrome <= 70 (reported from Zenfone 4 users, chrome://version shows 70.0.3538.110)
image

Analysis

Cofacts browser statistics (Cofacts chatbot LIFF stats, conducted in April 2020)

Intl.RelativeTimeFormat

image

Supporting Chrome >= 71 only covers 90% of Android user session; and iOS does not have v14 in 2020 (when this analysis is conducted). Therefore, we should handle the case when Intl.RelativeTimeFormat is not supported.

Intl.DateTimeFormat

image

In Cofacts, 100% of android sessions and 99% iOS sessions have Intl.DateTimeFormat. We can safely assume Intl.DateTimeFormat always exists.

Solutions

Choose one from the following:

  1. https://formatjs.io/docs/polyfills/intl-relativetimeformat/
  2. Change back to date-fns
  3. other polyfill
@MrOrz MrOrz changed the title iOS safari 13 does not have Intl.RelativeTimeFormat Chrome < 71, iOS safari 13 does not have Intl.RelativeTimeFormat Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant