Instance Method
format(_:)
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
Creates a locale-aware attributed string representation from a date value.
func format(_ value: Date) -> AttributedString
Parameters
valueThe date to format.
Return Value
An attributed string representation of the date.
Discussion
Once you create a style, you can use it to format dates multiple times.