moneyphp / iso-currencies Goto Github PK
View Code? Open in Web Editor NEWProvides up-to-date list of ISO 4217 currencies
License: MIT License
Provides up-to-date list of ISO 4217 currencies
License: MIT License
In the ISO, YER has cents like USD, EUR ..etc.
https://github.com/moneyphp/iso-currencies/blob/d66effc1c28c6868f7d782dcc6ba965415ed68e8/resources/current.yaml#L884C8-L884C8
But it is not being formatted like them!
for example (USD) :
$money = Money::USD(850);
$currencies = new ISOCurrencies();
$numberFormatter = new \NumberFormatter('en_USA', \NumberFormatter::CURRENCY);
$moneyFormatter = new IntlMoneyFormatter($numberFormatter, $currencies);
echo $moneyFormatter->format($money); // outputs $8.50 correct .
when it comes to YER :
$money = Money::YER(850);
$currencies = new ISOCurrencies();
$numberFormatter = new \NumberFormatter('en_YER', \NumberFormatter::CURRENCY);
$moneyFormatter = new IntlMoneyFormatter($numberFormatter, $currencies);
echo $moneyFormatter->format($money); // outputs YER 8 not correct !! it is supposed to be YER 8.50
could anyone tell me what I am doing wrong ๐ค?
On the app I am currently working we need to show a list of ISO codes and currency names. Since we are pulling in this package (through the use of moneyphp/money
) and it already contains al data we need, it would be nice to expose it.
I get composer dependency errors since I'm using symfony 4.3 components. Would you be able to bump up the dependency version to support symfony/yaml ^4.3 ?
in Belarus we recently changed BYR to BYN, and imagine we have a data in database in BYR currencies and BYN currencies. And after I upgrade the library to the newest version I will no longer be able to work with old data, because Money\Money doesn't know about BYR anymore, which is wrong, as currency is there forever (as BYB - another ancient Belarus currency).
I am happy to prepare PR at some point, if maintainers say yes it makes sense to add those historical data.
I have seen a few anomalies in the currency data created by this script.
EUR
, USD
and other currencies used by multiple countries. There are multiple countries in the list each claiming usage of EUR
(as is expected). In the generated output however, these get overwritten similarly to the above issue with the last country claiming the EUR 'winning' in the list, in the current iteration, Spain: https://github.com/moneyphp/iso-currencies/blob/master/resources/current.php#L10Would you be interested in a MR that will implement the export of the Iso Currencies to a Yaml file using the symfony component?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.