Created
March 21, 2018 19:39
-
-
Save vialyx/9274fbc524ec705577eb6f4554f6439e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let unit = Measurement(value: 1290, unit: UnitLength.miles) | |
let measurementFormatter = MeasurementFormatter() | |
print("Measurement miles: \(measurementFormatter.string(from: unit))") | |
// Measurement miles: 1,290 mi | |
let kilometers = unit.converted(to: UnitLength.kilometers) | |
// 2076.0486 km |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment