Skip to content

Initializer

init(pattern:locale:)

iOS 16.0+ iPadOS 16.0+ Mac Catalyst 16.0+ macOS 13.0+ tvOS 16.0+ watchOS 9.0+
Creates an instance using the provided pattern and locale.
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.