Skip to content

Conversation

@whizz
Copy link

@whizz whizz commented Jan 4, 2026

The helper function intcomma() uses toLocaleString(), but the reverse toInt() blindly assumes comma as a thousands separator and tries to remove just commas. In my locale, the thousand separator is space, so the functionality silently breaks. It parses "10 000" as 10. This fix addresses it by removing anything other than digits.

@medisoft
Copy link

it could be a problem in locales like some European countries.

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.

2 participants