Money icon indicating copy to clipboard operation
Money copied to clipboard

Remove Decimals

Open Wilsonilo opened this issue 8 years ago • 2 comments

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 avatar Dec 16 '16 18:12 Wilsonilo

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

Wilsonilo avatar Jan 03 '17 20:01 Wilsonilo

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

Wilsonilo avatar Jan 30 '17 21:01 Wilsonilo