Closed wess closed 8 years ago
Hi @wess - is this not already supported? https://github.com/danthorpe/Money/blob/development/Money/Shared/Money.swift#L112
I missed that, but is Locale > NSLocale?
It's how you do it here, I see:
func formattedWithStyle(style: NSNumberFormatterStyle) -> String {
return Currency.formattedWithStyle(style, forLocaleId: NSLocale.currentLocale().localeIdentifier)(amount)
}
Sorry - you are quite right. Locale
is not NSLocale
- this is going to be a problem for Swift 3.
We can add an extension which accepts a NSLocale
or identifier? Ultimately it calls though into the static method on Currency
.
I can't do this until the weekend - but happy to accept a Pull Request from you if you want to add a method to the same extension in Money.swift?
Ability to pass NSLocale to the
forLocale
param