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

FEATURE REQUEST: Add Currency Conversion Utilities #37

Closed
adam-rocska opened this issue Jun 12, 2020 · 1 comment
Closed

FEATURE REQUEST: Add Currency Conversion Utilities #37

adam-rocska opened this issue Jun 12, 2020 · 1 comment

Comments

@adam-rocska
Copy link

The library concept is awesome and could lead to great stuff in the future.
It would be great to include some currency conversion utilities which could potentially allow us wild ass stuff, like : let myCash = (USD(300) + EUR(150)) as HUF

What do you think?

@Mordil
Copy link
Member

Mordil commented Jun 13, 2020

Hi @adam-rocska thanks for the suggestion!

I've been thinking about currency exchanges since I started work on SwiftCurrency, and I'd love to see it done. However, exchanges rates change by the second across the world, and the only way to correctly (legally, economically, mathematically) convert one currency into another is from a live currency service.

This could be done as another library product (e.g. CurrencyExchange) that SwiftCurrency would provide - but I think it might be better as a separate package so that Currency can be the baseline API which other packages can interop with. This is as similar approach to both SwiftMetrics and SwiftLog.

I would expect such a library would provide a mechanism for connecting to any of the various free & paid exchange services such as Open Exchange Rates or XE Currency Data.

I have wanted to start this myself, but I've been busy with other projects as well as my day job. If you or anyone else want to spearhead this - I'm willing to give a steering direction to move towards!

As such - this feature is out of scope for the Currency package.

@Mordil Mordil closed this as completed Jun 13, 2020
@Mordil Mordil pinned this issue Jun 13, 2020
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