Skip to content

Type MethodFoundationEssentials

time(pattern:)

iOS 16.0+ iPadOS 16.0+ Mac Catalyst 16.0+ macOS 13.0+ tvOS 16.0+ watchOS 9.0+
A factory variable to create a time format style to format a duration.
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.

Return Value

A format style to format a duration.