You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 2, 2018. It is now read-only.
Here what I'm trying to do, please let me know if my way of thinking if the mistake here.
I received a symbol (EUR, CHF, USD...) as a string from a fermer, and I have it associated with my store's object (in a way that this defines what currency the stores accepts).
My idea here was to simply create a currency variable, from Money, on the store's object and then call if every time I would bee some conversion/presentation to be done.
So it would be like this:
print("You have to pay \(StoreObject.currency(100))")
Can I do this using the actual Money library or is there any other way to do that?
Thank you!
The text was updated successfully, but these errors were encountered:
Hi @aliasbody - yeah, this isn't possible, and it's a long standing issue, #29.
Essentially, Money is a framework of static currency/money types, and you require dynamic money types, to create them from strings.
This is definitely something that I would like to change in a future version of this framework, but at the moment, I don't have enough time to work on it.
I would say that you should look into other options as solutions to this problem.
Hi everyone,
Here what I'm trying to do, please let me know if my way of thinking if the mistake here.
I received a symbol (EUR, CHF, USD...) as a string from a fermer, and I have it associated with my store's object (in a way that this defines what currency the stores accepts).
My idea here was to simply create a currency variable, from Money, on the store's object and then call if every time I would bee some conversion/presentation to be done.
So it would be like this:
print("You have to pay \(StoreObject.currency(100))")
Can I do this using the actual Money library or is there any other way to do that?
Thank you!
The text was updated successfully, but these errors were encountered: