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

Add simple polyfill for Intl.ListFormat #1585

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thatsmydoing
Copy link
Contributor

Fixes #1189

Copy link
Collaborator

@diesieben07 diesieben07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test for this.
You can see how the other polyfill tests work, for example test/info/localeWeek.test.js.

Copy link
Contributor Author

@thatsmydoing thatsmydoing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added the tests


Helpers.withoutLF("Duration#toHuman falls back to commas", () => {
expect(dur().reconfigure({ locale: "ja" }).toHuman()).toEqual(
"1 年, 2 か月, 1 週間, 3 日, 4 時間, 5 分, 6 秒, 7 ミリ秒"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I picked Japanese since it uses a different comma style

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@diesieben07 Hey sorry for the tag, just checking if u had a look at this

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

Successfully merging this pull request may close these issues.

"toHuman" uses Intl.ListFormat, which isn't supported by Safari < 14.1
4 participants