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

fix: Support for locales using decimal separators other than . (dot) #372

Merged
merged 4 commits into from Apr 30, 2023
Merged

fix: Support for locales using decimal separators other than . (dot) #372

merged 4 commits into from Apr 30, 2023

Conversation

cracksalad
Copy link
Contributor

When using somtehing like setlocale(LC_ALL, 'de_DE'); the function sprintf('%.1f, ...)' will use a comma for decimal separation. The function is_numeric() will output false for strings containing a comma. Thereby I had to replace the decimal separator of the used locale with a dot.

@cracksalad cracksalad changed the title Support for locales using decimal separators other than . (dot) fix: Support for locales using decimal separators other than . (dot) Apr 27, 2023
@ezyang
Copy link
Owner

ezyang commented Apr 28, 2023

Can we use number_format instead?

@cracksalad
Copy link
Contributor Author

Can we use number_format instead?

You are totally right. number_format is a much easier solution. I adjusted it.

@ezyang ezyang merged commit 43f49ac into ezyang:master Apr 30, 2023
10 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 17, 2023
# [4.17.0](v4.16.0...v4.17.0) (2023-11-17)

### Bug Fixes

* CSSTidy ImportantComments not handled properly ([#359](#359)) ([78a9b4d](78a9b4d))
* fix CI ([#361](#361)) ([9ec687c](9ec687c))
* Invalid scheme check in Attr.TargetBlank ([#363](#363)) ([0176ef4](0176ef4))
* semantic release ([#339](#339)) ([d82f3d9](d82f3d9))
* semantic release ([#341](#341)) ([e55fead](e55fead)), closes [#339](#339)
* Support for locales using decimal separators other than . (dot) ([#372](#372)) ([43f49ac](43f49ac))

### Features

* Add support for all text-decoration properties ([#360](#360)) ([2d775c0](2d775c0))
* Allows commas to be included in tel URI ([#389](#389)) ([ec92490](ec92490)), closes [#388](#388)

### Reverts

* Revert "fix: semantic release (#339)" (#340) ([3e83215](3e83215)), closes [#339](#339) [#340](#340)
Copy link

🎉 This PR is included in version 4.17.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants