Coder Social home page Coder Social logo

Some currency doesn't correct about countries HOT 6 CLOSED

rinvex avatar rinvex commented on August 15, 2024
Some currency doesn't correct

from countries.

Comments (6)

Omranic avatar Omranic commented on August 15, 2024 1

Yes, I agree. We may have to change getCurrency behavior and omit or separate the details currencies into different attribute for all countries. I'll keep this issue opened until further review.

from countries.

Omranic avatar Omranic commented on August 15, 2024

@khsing Check this please & tell me what do you think http://forexesteem.blogspot.com.eg/2009/03/explanation-of-usdussusn.html

from countries.

khsing avatar khsing commented on August 15, 2024

@Omranic In general the currency of USA is USD, although USN and USS are more detailed currency code, but not normal.

I think getCurrency should return the Currency which people used to use.

from countries.

willemwollebrants avatar willemwollebrants commented on August 15, 2024

I had the same problem. I've fixed it by adding an optional key 'default_currency' to the country data, and a new Country::getDefaultCurrency method. If default_currency is not set, Country::getDefaultCurrency returns the same as Country::getCurrency. (I could have just altered the order of currencies in the json files, but explicitly defining it seems more secure)

My code's here, if it's ok I can send a PR for this

from countries.

markitosgv avatar markitosgv commented on August 15, 2024

+1 for USD instead of USN

from countries.

Omranic avatar Omranic commented on August 15, 2024

Thank you for your patience, this is now fixed fundamentaly for all countries in 1cf372b, here's what's been done:

Update country currencies to include only the official currency (fix #52 #55 #72)

  • Removed fund, complementary and secondary currencies as it's not relevant to the countries package, and caused confusion before
  • This change affected 15 countries: Bolivia, Bhutan, Belarus, Switzerland, Chile, Cuba, Western Sahara, Haiti, British Indian Ocean Territory, Lesotho, Namibia, Panama, El Salvador, United States, Uruguay

from countries.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.