Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update source data? #45

Open
sliekens opened this issue Aug 4, 2016 · 4 comments
Open

Update source data? #45

sliekens opened this issue Aug 4, 2016 · 4 comments

Comments

@sliekens
Copy link

sliekens commented Aug 4, 2016

What is the source of the data in InitializeIsoCurrencies? Is it taken from Wikipedia?(https://github.com/remyvd/NodaMoney/blob/master/src/NodaMoney/CurrencyRegistry.cs#L135)

I'm asking because I use files from currency-iso.org in my application. They seem to be more up-to-date and complete than what NodaMoney provides: http://www.currency-iso.org/en/home/tables/table-a1.html

@RemyDuijkeren
Copy link
Owner

Which differences do you see?

The basic source is indeed from Wikipedia. I did a cross check and there seems to be a couple of differences and see the following points:

  1. The colón (SVC) is on the list of ISO, but the colón was the currency of El Salvador between 1892 and 2001. Apparently it is never been officially removed after amendment 115.
  2. Zimbabwe Dollar (ZWL) is also on the list of ISO, but is not used since 2009. This is apparently also still on the ISO list and it looks like it is also not officially been removed.
  3. USS (998) is removed from the list of ISO and also shown in amendment 158, but Wikipedia still has it :-(.

Going to do some checks on these and change Wikipedia and NodaMoney.

@RemyDuijkeren RemyDuijkeren added this to the v0.7.0 milestone Aug 4, 2016
@sliekens
Copy link
Author

sliekens commented Aug 9, 2016

I'm worried about the EnglishName. I didn't expect there to be so many differences. For example: USD
Wikipedia: United States dollar
currency-iso.org: US Dollar

I'm tempted to believe that currency-iso.org is closer to the ISO standard than Wikipedia but hell who knows...

@sliekens
Copy link
Author

sliekens commented Aug 9, 2016

It's a bit unfortunate that CurrencyBuilder requires a currency symbol. That's the only thing stopping me from using the XML that currency-iso.org provides instead of the built-in currencies.

I wouldn't mind if Money.ToString would format money using the ISO code instead of the currency symbol if no symbol was specified. In fact, why is this not a feature even when symbols are available?

RemyDuijkeren pushed a commit that referenced this issue Sep 11, 2016
…of El Salvador between 1892 and 2001. Apparently it is never been officially removed after amendment 115.)

Re-added Zimbabwe Dollar (ZWL) because it's on the ISO list (but is not used since 2009)
removed USS (998) because it's removed from the list of ISO
#45
RemyDuijkeren pushed a commit that referenced this issue Sep 24, 2016
@RemyDuijkeren RemyDuijkeren removed this from the v1.0.0 milestone Oct 10, 2016
@samcic
Copy link

samcic commented Feb 2, 2017

The Unicode CLDR is a frequently-recommended source for such information. It is used by many "big name" companies, is well maintained and importantly also includes the information necessary for culture-dependent formatting of currency amounts (e.g. if I'm formatting USD in Sweden I'd expect to see "USD 123,45" rather than "$123.45" which is what I'd see if I were in the US).

Client-side libraries like Globalize are built on the CLDR data and offer these more general formatting options.

On the server side, there doesn't really seem to be anything comparable for .NET. In my case I'm looking for a way to format currencies on the server side (e.g. for sending notification emails with a price in them) using the same CLDR source data as I use on the client.

Anyway, I just thought I'd share my opinion, although I imagine it would represent a considerable amount of work to change things to use the CLDR.

As a side note, I found what appears to be some more out-of-date info in this project w.r.t. the CLDR at least: RSD no longer has fractional units, neither does COP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants