-
-
Save laevandus/6b70f72775ce0195622f707a8f1405b2 to your computer and use it in GitHub Desktop.
This file contains 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 formatter = MeasurementFormatter() | |
formatter.locale = Locale(identifier: "en_US") | |
print(formatter.string(from: Measurement(value: 293, unit: UnitTemperature.kelvin))) | |
// 67.73°F | |
formatter.locale = Locale(identifier: "en_GB") | |
print(formatter.string(from: Measurement(value: 293, unit: UnitTemperature.kelvin))) | |
// 19.85°C |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment