time(pattern:)

A factory variable to create a time format style to format a duration.

iOS
16.0+
macOS
13.0+
tvOS
16.0+
watchOS
9.0+
static func time(pattern: Duration.TimeFormatStyle.Pattern) -> Self

Parameters

pattern

A Pattern to specify the units to include in the displayed string and the behavior of the units.

Returns

A format style to format a duration.