Skip to content

fixed #17708 (intl number formatter) #17826

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

Closed
wants to merge 2 commits into from

Conversation

schmunk42
Copy link
Contributor

Q A
Is bugfix? ✔️
New feature?
Breaks BC? ✔️/❌ (if you rely on a bug ;))
Tests pass? ✔️ (hopefully for all versions)
Fixed issues #17708

Looks like the intl formatter and framework implementation are off-by one handling digits?!

btw: How is the intl extension disabled in tests.


Addon: Format is also different between both implementation E5 vs. E+5, shouldn't that be fixed also or does this depend on a locale?

@schmunk42
Copy link
Contributor Author

I removed the hack, so this is now just some extended tests.

@schmunk42
Copy link
Contributor Author

Oh my...

This 1.20E2 (intl)
https://github.com/yiisoft/yii2/pull/17826/files#diff-6f7bd2d4996479139d8bd3d4950e00d5R518

should actually be the same as 1.23E2 (non intl)
https://github.com/yiisoft/yii2/pull/17826/files#diff-6f7bd2d4996479139d8bd3d4950e00d5R540

but it is not :(

with ICU greater 60 (with intl) it is 1.2E2 (the reason why I increased the digits in my initial commit)

So something is wrong with NumberFormatter and intl.

CC: @samdark

@samdark samdark closed this Jan 28, 2020
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