danthorpe / Money

Swift value types for working with money & currency
MIT License
933 stars 91 forks source link

Remove Decimals #71

Open Wilsonilo opened 7 years ago

Wilsonilo commented 7 years ago

I'm sorry for this questions, because the possibility to be simple is high but i've being trying to avoid using decimals and still get them, any help would be really appreciate it.

I basically just implement
let foo = Money(Int(bar))

And then i tried using formatted(withStyle: .none) and all the others, none of them remove the decimal presentation.

Wilsonilo commented 7 years ago

Happy new year guys! Sorry to be a pain, but any chance on this? Thanks!

Wilsonilo commented 7 years ago

number.formatted(withStyle: .decimal, forLocale: .English(.UnitedStates)) worked for me.