The formatting style for unit names.
SDKs
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
var unitsStyle: Date Components Formatter.Units Style { get set }
Discussion
Configures the strings to use (if any) for unit names such as days, hours, minutes, and seconds. Use this property to specify whether you want abbreviated or shortened versions of unit names—for example, hrs
instead of hours
.
The default value of this property is Date
.