Skip to content

Instance Method

locale(_:)

iOS 15.0+Deprecated iPadOS 15.0+Deprecated Mac Catalyst 15.0+Deprecated macOS 12.0+Deprecated tvOS 15.0+Deprecated watchOS 8.0+Deprecated

Deprecated

Use Date.FormatStyle.Attributed or Date.VerbatimFormatStyle.Attributed instead

Modifies the date attributed style to use the specified locale.
func locale(_ locale: Locale) -> Date.AttributedStyle

Parameters

locale

The locale to use when formatting a date.

Return Value

A date attributed style with the provided locale.