
import Foundation

let length = Measurement(value: 40, unit: UnitLength.kilometers)
let text = length.formatted(.measurement(width: .wide, usage: .road, numberFormatStyle: .number.precision(.fractionLength(2))))
print(text)  // "24.85 miles"
