init(pattern:locale:)
Creates a time format style using the provided pattern and optional locale.
Declaration
init(pattern: Duration.TimeFormatStyle.Pattern, locale: Locale = .autoupdatingCurrent)Parameters
- pattern:
A
Patternthat specifies the units to include in the displayed string and the behavior of the units. - locale:
The
Localeused to create the string representation of the duration. This parameter defaults to Autoupdatingcurrent.