Skip to content

value formatter #2

Description

@AMBIENTE1

Hi, thank you for your project. Its very nice. Iam trying to change many hours format value to locale "cs_CZ" with currency. Example number 123456.10 to 123 456,10 Kč. Iam sorry, Iam new one in SwiftUI. In swift just use:

`
extension Double {
var asLocaleCurrency: String {
let formatter = NumberFormatter()
formatter.numberStyle = .currency
formatter.locale = Locale(identifier: "cs_CZ")

    let formattedString = formatter.string(from: self as NSNumber)
    return formattedString ?? ""
}

}
let double = 123456.78
print(double.asLocaleCurrency) // 123 456,78 Kč
`
but in SwiftUI with your formatter?? Please help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions