No way how to change rounding strategy in NumberHelper
Harfusha opened this issue · 5 comments
Harfusha commented
Description
When i use locale cs_CZ NumberFormatter::ROUNDING_MODE defaults to NumberFormatter::ROUND_HALFEVEN, but i need to change it to NumberFormatter::ROUND_HALFUP.
Would be great if rounding strategy could be set in options.
$this->Number->format($decimalNumber, ['locale' => 'cs_CZ', 'places' => 2, 'precision' => 2, 'roundingMode' => NumberFormatter::ROUND_HALFUP])
CakePHP Version
4.5.2
dereuromark commented
Do you want to make a PR here for 5.x and we see how we can backport this?
dereuromark commented
Well, usually we create 5.x first then backport
So nothing gets missing and we dont lose functionality in upstream
Harfusha commented
Ok i will create new one for 5.x :)