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

➕ add missing currencies #61

Merged
merged 1 commit into from
Jan 23, 2021
Merged

➕ add missing currencies #61

merged 1 commit into from
Jan 23, 2021

Conversation

namenyi
Copy link
Collaborator

@namenyi namenyi commented Jan 23, 2021

This currency map has not been updated for a while and there were several issues / PRs about missing currencies.

Instead of reviewing and merging them one-by-one, I tried to find an official source of currencies and all the missing ones.


I chose the ISO 4217 standard about currency codes: https://www.iso.org/iso-4217-currency-codes.html

This standard establishes internationally recognized codes for the representation of currencies that enable clarity and reduce errors.

Here's their full list in XML format: https://www.currency-iso.org/dam/downloads/lists/list_one.xml

Thank you @davidporos92 for your ideas!


I also checked this site for symbols: https://www.foreignexchangelive.com/currency-codes-symbols/

@namenyi
Copy link
Collaborator Author

namenyi commented Jan 23, 2021

@namenyi
Copy link
Collaborator Author

namenyi commented Jan 23, 2021

The ISO 4217 contains some extra currencies that we could potentially add in the future:

  'USN': '$', // UNITED STATES OF AMERICA - US Dollar (Next day)
  'XAG': 'XAG', // ZZ11 Silver
  'XAU': 'XAU', // ZZ08 Gold
  'XBA': 'XBA', // ZZ01 Bond Markets Unit European Composite Unit (EURCO)
  'XBB': 'XBB', // ZZ02 Bond Markets Unit European Monetary Unit (E.M.U.-6)
  'XBC': 'XBC', // ZZ03 Bond Markets Unit European Unit of Account 9 (E.U.A.-9)
  'XBD': 'XBD', // ZZ04 Bond Markets Unit European Unit of Account 17 (E.U.A.-17)
  'XDR': 'XDR', // INTERNATIONAL MONETARY FUND (IMF) - SDR (Special Drawing Right)
  'XPD': 'XPD', // ZZ09 Palladium
  'XPT': 'XPT', // ZZ10 Platinum
  'XTS': 'XTS', // ZZ06 Codes specifically reserved for testing purposes
  'XXX': '', // ZZ07 The codes assigned for transactions where no currency is involved

I'm not 100% sure about the usefulness of these, so I'm not adding these in this current PR, but I'm open for opinions / suggestions.

@@ -18,6 +18,7 @@ module.exports = {
'BMD': '$',
'BND': '$',
'BOB': '$b',
'BOV': 'BOV',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BOLIVIA - Mvdol

@@ -28,10 +29,14 @@ module.exports = {
'BZD': 'BZ$',
'CAD': '$',
'CDF': 'FC',
'CHE': 'CHE',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SWITZERLAND - WIR Euro

'CHF': 'CHF',
'CHW': 'CHW',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SWITZERLAND - WIR Franc

'CHF': 'CHF',
'CHW': 'CHW',
'CLF': 'CLF',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CHILE - Unidad de Fomento

'CLP': '$',
'CNY': '¥',
'COP': '$',
'COU': 'COU',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

COLOMBIA - Unidad de Valor Real

'UZS': 'лв',
'VEF': 'Bs',
'VES': 'Bs.S',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VENEZUELA - Bolívar Soberano

@@ -169,7 +178,11 @@ module.exports = {
'XCD': '$',
'XOF': 'CFA',
'XPF': '₣',
'XSU': 'Sucre',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SISTEMA UNITARIO DE COMPENSACION REGIONAL DE PAGOS - Sucre

@@ -169,7 +178,11 @@ module.exports = {
'XCD': '$',
'XOF': 'CFA',
'XPF': '₣',
'XSU': 'Sucre',
'XUA': 'XUA',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MEMBER COUNTRIES OF THE AFRICAN DEVELOPMENT BANK GROUP - ADB Unit of Account

'YER': '﷼',
'ZAR': 'R',
'ZWD': 'Z$'
'ZWD': 'Z$',
'ZMW': 'ZK',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ZAMBIA - Zambian Kwacha

'ZWD': 'Z$'
'ZWD': 'Z$',
'ZMW': 'ZK',
'ZWL': '$'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ZIMBABWE - Zimbabwe Dollar

@namenyi namenyi merged commit 4ee8a72 into master Jan 23, 2021
@namenyi namenyi deleted the missing_currencies branch January 23, 2021 12:56
@namenyi
Copy link
Collaborator Author

namenyi commented Jan 23, 2021

Released in v5.0.0

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

Successfully merging this pull request may close these issues.

None yet

1 participant