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
patternA
Patternto specify the units to include in the displayed string and the behavior of the units.localeThe
Localeused to create the string representation of the duration.