locale(_:)

A modifier to set the locale of the format style.

iOS
16.0+
macOS
13.0+
tvOS
16.0+
watchOS
9.0+
func locale(_ locale: Locale) -> Duration.UnitsFormatStyle

Parameters

locale

The locale to apply to the format style.

Returns

A copy of this format with the new locale set.