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 applyCommaFormatToNumber #764

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

Conversation

bruh-9000
Copy link
Contributor

No description provided.

@minotalen
Copy link
Contributor

We'll consider #649, don't need both.

@minotalen minotalen closed this Mar 7, 2024
@minotalen
Copy link
Contributor

With this function, the exact formatting conventions can vary depending on the locale. Some examples:
United States (en-US):
Standard: 1,000,000
Decimal Point: 1,000.50
United Kingdom (en-GB):
Standard: 1,000,000
Decimal Point: 1,000.50
Germany (de-DE):
Standard: 1.000.000
Decimal Point: 1.000,50
France (fr-FR):
Standard: 1 000 000
Decimal Point: 1 000,5

Instead of toLocaleString, write a custom function that adds a separator ever 3 digits as well as comma separator.

@minotalen minotalen reopened this Mar 22, 2024
@bruh-9000
Copy link
Contributor Author

Doesn't toLocaleString do that already?

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.

None yet

2 participants