Coder Social home page Coder Social logo

Comments (5)

osrec avatar osrec commented on June 3, 2024 1

Thanks for the pull request - we will get this merged in a few days - just clearing a backlog of issues!

from currencyformatter.js.

osrec avatar osrec commented on June 3, 2024 1

ok, had a chat with a few other guys and we agree with you. It should indeed be a function of the currency code, so we'll review and use your changes :)

from currencyformatter.js.

osrec avatar osrec commented on June 3, 2024 1

Ok, we have another swerve ball. Spoke to the original creator of the lib, and it turns out that the locale should indeed drive the currency format, not the currency itself. Why? Because one currency can be formatted differently across different regions (classic example is the Euro). ISO 4217 lists the currencies and the minor units, but not the formats. The standard for currency formats is the CLDR (http://cldr.unicode.org/), which is what the library is based on, however the CLDR can take a bit of time to update.

So we will close this pull request for now, but you did make some important format updates to a number of currencies, which we will include in the next update. Thanks for all the hard work :)

from currencyformatter.js.

osrec avatar osrec commented on June 3, 2024

Just reviewed your pull request, and I'm thinking it might be easier to just maintain a custom set of locales that we map against these currencies, rather than adding all the logic with the mantissa length.

What do you think?

from currencyformatter.js.

davvidbaker avatar davvidbaker commented on June 3, 2024

Yeah maybe. I think the more important thing is that the mantissa should be a function of countryCode and not locale, but maybe that isn't something you want this library to do.

from currencyformatter.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.