StructureFoundationEssentials
Date.AttributedStyle
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
A structure that creates a locale-appropriate attributed string representation of a date instance.
struct AttributedStyle
Overview
Use a Date.FormatStyle instance to customize the lexical representation of a date as a string. Use the format style’s attributed property to customize the visual representation of the date as a string. Attributed strings can represent the subcomponent characters, words, and phrases of a string with a custom combination of font size, weight, and color.
Topics
Instance Methods
func format(Date) -> AttributedStringCreates a locale-aware attributed string representation from a date value.func locale(Locale) -> Date.AttributedStyleModifies the date attributed style to use the specified locale.
Default Implementations
Relationships
Conforms To
FormatStyleSwift.CopyableSwift.DecodableSwift.EncodableSwift.EquatableSwift.EscapableSwift.HashableSwift.SendableSwift.SendableMetatype