vimeo / py-money

Money class for Python 3
MIT License
125 stars 27 forks source link

Incorrect sub_units for several currencies #9

Open shridharama opened 5 years ago

shridharama commented 5 years ago

I happen to be looking for python libraries related that offer some capability of major unit to minor unit conversion, and came across your repo. Just wanted to let you know that the sub_units in many currencies here https://github.com/vimeo/py-money/blob/master/money/currency.py are out of date. Ex: CLP, ISK, KRW, etc should have sub_unit as 1, not 100. The full list can be found here https://www.currency-iso.org/en/home/tables/table-a1.html.

nickyr commented 5 years ago

Mmm thanks for the info, will investigate.

nickyr commented 5 years ago

Hey there, just letting you know I'm not finding time to prioritize this. If you'd like to open a PR, I'll review it though!

wapiflapi commented 3 years ago

Maybe worth following an approach like https://github.com/dahlia/iso4217/blob/main/setup.py which downloads the data during settup.py install, basically having it as a dependency.

Might have some issues with corporate proxies and such, but you could have a default xml file in the repository (possibly out of date) on which to fall back on.

I might look at this at some point if I need the feature.