Skip to content

CurrencyBundle::getRoundingIncrement() always retruns 0 #21247

@enumag

Description

@enumag
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),
                ]);
            }
        }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy