init(pattern:locale:)

Creates an instance using the provided pattern and locale.

iOS
16.0+
macOS
13.0+
tvOS
16.0+
watchOS
9.0+
init(pattern: Duration.TimeFormatStyle.Pattern, locale: Locale = .autoupdatingCurrent)

Parameters

pattern

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

locale

The Locale used to create the string representation of the duration.