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

Support currency pairs (e.g. EUR/USD) #4

Open
wjcrowcroft opened this issue Jan 2, 2012 · 2 comments
Open

Support currency pairs (e.g. EUR/USD) #4

wjcrowcroft opened this issue Jan 2, 2012 · 2 comments

Comments

@wjcrowcroft
Copy link
Member

A cool potential feature, logged for later - use money.js to get the rate for any given currency pair - if it wouldn't bloat the code too much

// Something like:
fx("EUR/USD").get() // 1.2945

// or:
fx.pair("GBP/AED") // 5.6974

If anyone has thoughts on that, you know what to do.

@thewarpaint
Copy link

Hell, that would be terrific. And it would be perfect if money.js had a set method in that style, for example:

fx("EUR/MXN").set(12.345678)

This is useful because sometimes I let the user input the exchange rate of an arbitrary currency pair, and I have to manually convert the rate to the base since I'm using the Forever Free plan of OpenExchangeRates, and I cannot change the base currency.

@thewarpaint
Copy link

On second thought, I don't think what I just said is possible without assuming only one of the currencies exchange rate (relative to the base currency) is left unchanged.

thewarpaint added a commit to thewarpaint/money.js that referenced this issue Mar 19, 2013
This was referenced Dec 29, 2015
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

No branches or pull requests

2 participants