-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
CakeNumber::toPercentage should allow separator localization #1955
Comments
6th Apr 2012, euromark said: ok, obviously not the best solution since toReadableSize() lacks the same thing. |
7th Apr 2012, euromark said: we could use number_format() here, as well, I think. |
14th Aug 2012, euromark said: are there any downsides of using the explicit arguments (similar to CakeNumber::format() etc?) the advantage would be that we don't have to rely on the current environment settings. they can either be unreliable across systems/plattforms/installations or not desired to be changed inside the app (as they would change other things, as well, and can break existing code, e.g. decimal handling for validation). |
14th Aug 2012, Mark Story said: It would be painful to have to type ',' every time you have to format a number. Also it changes the existing behavior so it'd have to wait. |
14th Aug 2012, euromark said: doesnt CakeTime use Configure defaults if none are specified (timezone)? that could be an option to reduce this issue. |
Shouldn't we change the milestone for this to 3.0 because @dereuromark's PR wasn't merged? |
This was implemented in version 3 |
Created by euromark, 6th Apr 2012. (originally Lighthouse ticket #2763):
What I did
What happened
And since it is a finalized string the separator cannot be adjusted to localized settings anymore (in some countries it is , instead of . here).
What I expected to happen
Possible Solution
We should provide a way to pass the decimals separator (similar to _numberFormat):
The text was updated successfully, but these errors were encountered: