Skip to content

dohliam/currency

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Currency Conversion - Generate lists of common unit conversions in a variety of currencies

Converts between 160+ currencies based on the foreign exchange listings from the EU Central Bank, and provides a handy printable table of common currency unit conversions in both directions.

An online demo is available here.

Supported currencies

Daily currency exchange rates are provided by the European Central Bank. The following currencies are supported:

  • AED: United Arab Emirates Dirham
  • AFN: Afghan Afghani
  • ALL: Albanian Lek
  • AMD: Armenian Dram
  • ANG: Netherlands Antillean Guilder
  • AOA: Angolan Kwanza
  • ARS: Argentine Peso
  • AUD: Australian Dollar
  • AWG: Aruban Florin
  • AZN: Azerbaijani Manat
  • BAM: Bosnia-Herzegovina Convertible Mark
  • BBD: Barbadian Dollar
  • BDT: Bangladeshi Taka
  • BGN: Bulgarian Lev
  • BHD: Bahraini Dinar
  • BIF: Burundian Franc
  • BMD: Bermudan Dollar
  • BND: Brunei Dollar
  • BOB: Bolivian Boliviano
  • BRL: Brazilian Real
  • BSD: Bahamian Dollar
  • BTC: Bitcoin
  • BTN: Bhutanese Ngultrum
  • BWP: Botswanan Pula
  • BYN: Belarusian Ruble
  • BZD: Belize Dollar
  • CAD: Canadian Dollar
  • CDF: Congolese Franc
  • CHF: Swiss Franc
  • CLF: Chilean Unit of Account (UF)
  • CLP: Chilean Peso
  • CNH: Chinese Yuan (Offshore)
  • CNY: Chinese Yuan
  • COP: Colombian Peso
  • CRC: Costa Rican Colón
  • CUC: Cuban Convertible Peso
  • CUP: Cuban Peso
  • CVE: Cape Verdean Escudo
  • CZK: Czech Republic Koruna
  • DJF: Djiboutian Franc
  • DKK: Danish Krone
  • DOP: Dominican Peso
  • DZD: Algerian Dinar
  • EGP: Egyptian Pound
  • ERN: Eritrean Nakfa
  • ETB: Ethiopian Birr
  • EUR: Euro
  • FJD: Fijian Dollar
  • FKP: Falkland Islands Pound
  • GBP: British Pound Sterling
  • GEL: Georgian Lari
  • GGP: Guernsey Pound
  • GHS: Ghanaian Cedi
  • GIP: Gibraltar Pound
  • GMD: Gambian Dalasi
  • GNF: Guinean Franc
  • GTQ: Guatemalan Quetzal
  • GYD: Guyanaese Dollar
  • HKD: Hong Kong Dollar
  • HNL: Honduran Lempira
  • HRK: Croatian Kuna
  • HTG: Haitian Gourde
  • HUF: Hungarian Forint
  • IDR: Indonesian Rupiah
  • ILS: Israeli New Sheqel
  • IMP: Manx pound
  • INR: Indian Rupee
  • IQD: Iraqi Dinar
  • IRR: Iranian Rial
  • ISK: Icelandic Króna
  • JEP: Jersey Pound
  • JMD: Jamaican Dollar
  • JOD: Jordanian Dinar
  • JPY: Japanese Yen
  • KES: Kenyan Shilling
  • KGS: Kyrgystani Som
  • KHR: Cambodian Riel
  • KMF: Comorian Franc
  • KPW: North Korean Won
  • KRW: South Korean Won
  • KWD: Kuwaiti Dinar
  • KYD: Cayman Islands Dollar
  • KZT: Kazakhstani Tenge
  • LAK: Laotian Kip
  • LBP: Lebanese Pound
  • LKR: Sri Lankan Rupee
  • LRD: Liberian Dollar
  • LSL: Lesotho Loti
  • LYD: Libyan Dinar
  • MAD: Moroccan Dirham
  • MDL: Moldovan Leu
  • MGA: Malagasy Ariary
  • MKD: Macedonian Denar
  • MMK: Myanma Kyat
  • MNT: Mongolian Tugrik
  • MOP: Macanese Pataca
  • MRO: Mauritanian Ouguiya (pre-2018)
  • MRU: Mauritanian Ouguiya
  • MUR: Mauritian Rupee
  • MVR: Maldivian Rufiyaa
  • MWK: Malawian Kwacha
  • MXN: Mexican Peso
  • MYR: Malaysian Ringgit
  • MZN: Mozambican Metical
  • NAD: Namibian Dollar
  • NGN: Nigerian Naira
  • NIO: Nicaraguan Córdoba
  • NOK: Norwegian Krone
  • NPR: Nepalese Rupee
  • NZD: New Zealand Dollar
  • OMR: Omani Rial
  • PAB: Panamanian Balboa
  • PEN: Peruvian Nuevo Sol
  • PGK: Papua New Guinean Kina
  • PHP: Philippine Peso
  • PKR: Pakistani Rupee
  • PLN: Polish Zloty
  • PYG: Paraguayan Guarani
  • QAR: Qatari Rial
  • RON: Romanian Leu
  • RSD: Serbian Dinar
  • RUB: Russian Ruble
  • RWF: Rwandan Franc
  • SAR: Saudi Riyal
  • SBD: Solomon Islands Dollar
  • SCR: Seychellois Rupee
  • SDG: Sudanese Pound
  • SEK: Swedish Krona
  • SGD: Singapore Dollar
  • SHP: Saint Helena Pound
  • SLL: Sierra Leonean Leone
  • SOS: Somali Shilling
  • SRD: Surinamese Dollar
  • SSP: South Sudanese Pound
  • STD: São Tomé and Príncipe Dobra (pre-2018)
  • STN: São Tomé and Príncipe Dobra
  • SVC: Salvadoran Colón
  • SYP: Syrian Pound
  • SZL: Swazi Lilangeni
  • THB: Thai Baht
  • TJS: Tajikistani Somoni
  • TMT: Turkmenistani Manat
  • TND: Tunisian Dinar
  • TOP: Tongan Pa'anga
  • TRY: Turkish Lira
  • TTD: Trinidad and Tobago Dollar
  • TWD: New Taiwan Dollar
  • TZS: Tanzanian Shilling
  • UAH: Ukrainian Hryvnia
  • UGX: Ugandan Shilling
  • USD: United States Dollar
  • UYU: Uruguayan Peso
  • UZS: Uzbekistan Som
  • VEF: Venezuelan Bolívar Fuerte (Old)
  • VES: Venezuelan Bolívar Soberano
  • VND: Vietnamese Dong
  • VUV: Vanuatu Vatu
  • WST: Samoan Tala
  • XAF: CFA Franc BEAC
  • XAG: Silver Ounce
  • XAU: Gold Ounce
  • XCD: East Caribbean Dollar
  • XDR: Special Drawing Rights
  • XOF: CFA Franc BCEAO
  • XPD: Palladium Ounce
  • XPF: CFP Franc
  • XPT: Platinum Ounce
  • YER: Yemeni Rial
  • ZAR: South African Rand
  • ZMW: Zambian Kwacha
  • ZWL: Zimbabwean Dollar

Usage

Enter an amount in the Amount box and select a corresponding currency from the options in the from and to dropdowns. Then press the Convert button to display the converted values in both directions.

Reference tables

The reference tables displayed below each unit conversion provide 50 common unit amounts in both directions for the two selected currencies.

At the bottom of the page there is a button labelled Print reference table. Pressing this button will allow you to print a nicely formatted single page table of currency conversions for the selected currency pair, or save it as a PDF.

Updating exchange rates

The current exchange rate date is displayed underneath the Convert button. There are a couple of ways to update the exchange rates:

  1. Click on the Update rates button at the top of the page
  2. Manually update the exchange rate XML file

The Update rates button

Clicking on the Update rates button at the top of the page is the easiest way to update the currency exchange rates from within the app. This will attempt to download the latest daily rates from the EU Central Bank. If successful, the new date will be shown in the status area under the Convert button. The EU rates are updated daily at 16:00 CET.

After updating, the new rates will be remembered across visits using HTML5 local storage. Therefore the rates only need to be updated once per day to get the latest rate.

Since the EUCB website does not provide an API or enable cross-domain requests, automatic updating through the Update rates button relies on the free API provided by Exchangerate.host. If this service is not available, it is still possible to update the rates manually.

The most recently-updated rates are stored in the browser, and will be used if offline.

Manually update the exchange rate XML file

The latest rates can be manually updated by replacing the file eurofxref-daily.xml in the source directory with this file. Currency Table will use this file by default if the rates have not been updated automatically through the app.

See also

"Currency Table" is part of the tiny tools series, a collection of small mobile-friendly JavaScript tools for performing common tasks in the browser.

Other tools for working with numbers and units that might also be of interest:

Credits

License

MIT.

About

Currency Conversion - Generate lists of common unit conversions in a variety of currencies

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published