Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | 3.1.7 |
I'm solving certain issues with currencies and rounding in our system. While doing that I noticed method NumberFormatter::roundCurrency()
which applies something called "Swiss rounding"? I'm not quite sure what it is about but it calls method Intl::getCurrencyBundle()->getRoundingIncrement($currency);
. Now here is the strange thing, this method currently returns 0 for all currencies - meaning that the swiss rounding is never actually used. Is that correct? If it is than what's the point of this method and swiss rounding?
// this code never dumps anything
$cbundle = Intl::getCurrencyBundle();
foreach ($cbundle->getCurrencyNames() as $code => $name) {
if ($cbundle->getRoundingIncrement($code) !== 0) {
dump([
$code,
$cbundle->getRoundingIncrement($code),
]);
}
}