Commit 5df07201 by Demid Merzlyakov

IOS-80: shared measurement formatter.

parent ce4d4d32
......@@ -7,9 +7,13 @@
import Foundation
extension MeasurementFormatter {
fileprivate static let oneWeatherSharedFormatter = MeasurementFormatter()
}
extension Measurement {
private static func formatter(style: Formatter.UnitStyle, unitOptions: MeasurementFormatter.UnitOptions = .providedUnit) -> MeasurementFormatter {
let fmt = MeasurementFormatter()
let fmt = MeasurementFormatter.oneWeatherSharedFormatter
fmt.locale = Settings.shared.locale
fmt.unitStyle = style
fmt.unitOptions = unitOptions
......
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