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

feat: add Intl.ListFormat to useFormatter #327

Merged
merged 10 commits into from
Jun 20, 2023

Conversation

stefanprobst
Copy link
Contributor

This adds a list method to useFormatter() to format lists with Intl.ListFormat.

closes #326

@vercel
Copy link

vercel bot commented Jun 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
example-next-13-next-auth ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2023 2:32pm
next-intl-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2023 2:32pm
next-intl-example-next-13 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2023 2:32pm

@vercel
Copy link

vercel bot commented Jun 12, 2023

@stefanprobst is attempting to deploy a commit to the next-intl Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Owner

@amannn amannn left a comment

Choose a reason for hiding this comment

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

Fantastic PR, many thanks! 🙌

I've added some docs and fixed the code formatting, hope that's ok.

packages/use-intl/src/core/Formats.tsx Show resolved Hide resolved
@@ -82,7 +82,7 @@ function Component() {

format.dateTime(new Date('2020-11-20T10:36:01.516Z'), 'short');
format.number(47.414329182, 'precise');
format.enumeration(['HTML', 'CSS', 'JavaScript'], 'enumeration');
format.list(['HTML', 'CSS', 'JavaScript'], 'enumeration');
Copy link
Owner

Choose a reason for hiding this comment

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

Thanks!

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 this pull request may close these issues.

Add Intl.ListFormat to useFormatter
2 participants