---
title: usage
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/measurement/formatstyle/usage
---

# usage

The intended purpose of the formatted measurement.

## Declaration

```swift
var usage: MeasurementFormatUnitUsage<UnitType>?
```

## Discussion

Discussion You can use the usage property to specify the intended purpose of the formatted measurement. The default option, general, formats the measurement with the default unit for the current locale. The asProvided option formats the measurement using the specified unit, ignoring the unit that the locale uses. The following example shows a formatted temperature using the default unit for the en_US locale and using a provided Celsius unit: let temperature = Measurement<UnitTemperature>(value: 36.8, unit: .celsius) temperature.formatted() // 98°F

temperature.formatted(.measurement(width: .abbreviated, usage: .asProvided)) // 36.8°C All unit types have general and asProvided options. Some subclasses have additional options, such as the following: UnitTemperature person weather UnitLength person personHeight road UnitEnergy food workout UnitMass personWeight

## See Also

### Modifying a measurement format style

- [width](foundation/measurement/formatstyle/width.md)
- [Measurement.FormatStyle.UnitWidth](foundation/measurement/formatstyle/unitwidth.md)
- [numberFormatStyle](foundation/measurement/formatstyle/numberformatstyle.md)
- [hidesScaleName](foundation/measurement/formatstyle/hidesscalename.md)
- [locale](foundation/measurement/formatstyle/locale.md)
- [locale(_:)](foundation/measurement/formatstyle/locale(_:).md)
