moneyphp / money

PHP implementation of Fowler's Money pattern.
http://moneyphp.org
MIT License
4.56k stars 439 forks source link

Bring back HRK currency #750

Closed gjuric closed 1 year ago

gjuric commented 1 year ago

v4.1.1 removed Croatian Kuna from the list of currencies.

Although Croatia has switched to Euro as of January 1th 2023, there is still obligation to show both prices till the end of this year.

Not to mention that historical data is going nowhere.

Therefore I would request that HRK is reinstated as a currency.

frederikbosch commented 1 year ago

The ISO Currencies class is linked to the moneyphp/iso-currencies package, which in turn uses a third party list. That is not going to change.

Use AggregateCurrencies to support unlisted currencies.

$currencies = new AggregateCurrencies([
    new ISOCurrencies(),
    new CurrencyList([
        'HRK' => 2
    ])
]);
gjuric commented 1 year ago

HRK is still in https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list-three.xml that you fetch using that package but it gets dumped to resources/historic.*

Is there a chance that you include historic currencies as well in the list of ISOCurrencies()?

frederikbosch commented 1 year ago

Sorry, we do not maintain history. You will have to create your own currencies class for this.