locale(_:)

Modifies the format style to use the specified locale.

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

Parameters

locale

The locale to use when formatting a duration.

Returns

A format style with the provided locale.