Skip to content

Commit

Permalink
Fix compilation for iOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
objecthub committed May 29, 2023
1 parent fa74913 commit 4672937
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/CLFormat/NumberFormat.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ public struct NumberFormat {
formatter.locale = locale ?? NumberFormat.currentLocale
} else if usegroup {
formatter.locale = NumberFormat.defaultLocale
#if os(macOS)
formatter.localizesFormat = false
#endif
}
formatter.usesGroupingSeparator = usegroup
var str = formatter.string(from: number.nsnumber) ?? number.description
Expand Down Expand Up @@ -213,7 +215,9 @@ public struct NumberFormat {
formatter.locale = locale ?? NumberFormat.currentLocale
} else if usegroup {
formatter.locale = NumberFormat.defaultLocale
#if os(macOS)
formatter.localizesFormat = false
#endif
}
if let groupsep = groupsep {
formatter.groupingSeparator = String(groupsep)
Expand Down Expand Up @@ -256,7 +260,9 @@ public struct NumberFormat {
if uselocale {
formatter.locale = locale ?? NumberFormat.currentLocale
} else if usegroup {
#if os(macOS)
formatter.localizesFormat = false
#endif
} else if style == .ordinal {
formatter.locale = locale ?? NumberFormat.defaultLocale
}
Expand Down

0 comments on commit 4672937

Please sign in to comment.