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

Format for chosen locale #172

Open
rekire opened this issue Oct 29, 2018 · 0 comments
Open

Format for chosen locale #172

rekire opened this issue Oct 29, 2018 · 0 comments

Comments

@rekire
Copy link

rekire commented Oct 29, 2018

I'm wondering why there is no option to specify the locale. After a small research I found out that it is not so easy as expected initial, but it seems to be able.

Number has the prototype toLocaleString() which does that what I would expect. See also MDN for more details. Spoiler: You need to set minimumFractionDigits and maximumFractionDigits as options.

Just for those which are not familiar the correct formatted result of 10000 divided by 3 is in en-US: 3,333.33 while in de_DE: 3.333,33.

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

No branches or pull requests

1 participant