Commit 4c92873d by Demid Merzlyakov

Fix temperature formatting.

parent d71867cc
......@@ -11,7 +11,7 @@ extension Measurement {
private static func formatter(style: Formatter.UnitStyle, unitOptions: MeasurementFormatter.UnitOptions = .providedUnit) -> MeasurementFormatter {
let fmt = MeasurementFormatter()
fmt.locale = Settings.shared.locale
fmt.unitStyle = .short
fmt.unitStyle = style
fmt.unitOptions = unitOptions
fmt.numberFormatter.maximumFractionDigits = 0
return fmt
......@@ -40,7 +40,7 @@ extension Temperature {
}
var shortString:String {
return Measurement.formatter(style: .short, unitOptions: .temperatureWithoutUnit).string(from: self)
return String(format: "%.0f°", settingsConvertedValue)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment