StructureFoundationInternationalization
Date.FormatStyle.Attributed
iOS 18.0+
iPadOS 18.0+
Mac Catalyst 18.0+
macOS 15.0+
tvOS 18.0+
watchOS 11.0+
The type preserving attributed variant of this style.
@dynamicMemberLookup struct Attributed
Overview
This style attributes the formatted date with the AttributeScopes.FoundationAttributes.DateFormatFieldAttribute.
Topics
Initializers
Instance Methods
func day(Date.FormatStyle.Symbol.Day) -> Date.FormatStyle.AttributedChange the representation of the day of the month in the format.func dayOfYear(Date.FormatStyle.Symbol.DayOfYear) -> Date.FormatStyle.AttributedChange the representation of the day of the year in the format.func era(Date.FormatStyle.Symbol.Era) -> Date.FormatStyle.AttributedChange the representation of the era in the format.func format(Date) -> AttributedStringCreates a locale-aware attributed string representation from a date value.func hour(Date.FormatStyle.Symbol.Hour) -> Date.FormatStyle.AttributedChange the representation of the hour in the format.func locale(Locale) -> Date.FormatStyle.AttributedModifies the date attributed style to use the specified locale.func minute(Date.FormatStyle.Symbol.Minute) -> Date.FormatStyle.AttributedChange the representation of the minute in the format.func month(Date.FormatStyle.Symbol.Month) -> Date.FormatStyle.AttributedChange the representation of the month in the format.func quarter(Date.FormatStyle.Symbol.Quarter) -> Date.FormatStyle.AttributedChange the representation of the quarter in the format.func second(Date.FormatStyle.Symbol.Second) -> Date.FormatStyle.AttributedChange the representation of the second in the format.func secondFraction(Date.FormatStyle.Symbol.SecondFraction) -> Date.FormatStyle.AttributedChange the representation of the second fraction in the format.func timeZone(Date.FormatStyle.Symbol.TimeZone) -> Date.FormatStyle.AttributedChange the representation of the time zone in the format.func week(Date.FormatStyle.Symbol.Week) -> Date.FormatStyle.AttributedChange the representation of the week in the format.func weekday(Date.FormatStyle.Symbol.Weekday) -> Date.FormatStyle.AttributedChange the representation of the weekday in the format.func year(Date.FormatStyle.Symbol.Year) -> Date.FormatStyle.AttributedChange the representation of the year in the format.
Subscripts
Default Implementations
Relationships
Conforms To
DiscreteFormatStyleFormatStyleSwift.CopyableSwift.DecodableSwift.EncodableSwift.EquatableSwift.EscapableSwift.HashableSwift.SendableSwift.SendableMetatype