Enumeration Case

DateComponentsFormatter.UnitsStyle.positional

A style that uses the position of a unit of time to identify its value.

Declaration

case positional = 0

Discussion

This style is most commonly used for time values where the hour, minute, and second values are separated by colons. You can use the zero formatting behaviors (DateComponentsFormatter.ZeroFormattingBehavior) to further modify the formatting of this value.

For example, one hour and ten minutes is displayed in the U.S. English locale as “1:10:00”.

See Also

Styles

case spellOut

A style that spells out the units and quantities of time.

case full

A style that spells out the units of time, but not the quantities.

case short

A style that uses a shortened spelling for units.

case brief

A style that uses a shortened spelling for units of time that is shorter than DateComponentsFormatter.UnitsStyle.short.

case abbreviated

A style that uses the most abbreviated spelling for units of time.