abbreviated
TypeScriptstatic get abbreviated(): Date_FormatStyle_Symbol_WeekdaySwift declarationstatic var abbreviated: Date.FormatStyle.Symbol.Weekday { get }Abbreviated day of week name. For example, "Tue".
struct · iOS 15.0+ · SDK 27.1
struct WeekdayA type that specifies the format for the weekday name in a date format style. The type ``Date/FormatStyle/Symbol/Weekday`` includes static factory variables that create custom ``Date/FormatStyle/Symbol/Weekday`` objects: |Factory variable|Description| |---|---| | ``Date/FormatStyle/Symbol/Weekday/abbreviated`` | Abbreviated weekday name. For example, `Tue`. | | ``Date/FormatStyle/Symbol/Weekday/wide`` | Wide weekday name. For example, `Tuesday`. | | ``Date/FormatStyle/Symbol/Weekday/narrow`` | Narrow weekday name. For example, `T`. | | ``short`` | Short weekday name. For example, `Tu`. | | ``oneDigit`` | Local numeric one-digit day of week. The value depends on the local starting day of the week. For example, this is `2` if Sunday is the first day of the week. | | ``twoDigits`` | Local numeric two-digit day of week, zero-padded if necessary. The value depends on the local starting day of the week. For example, this is `02` if Sunday is the first day of the week. | To customize the weekday, name format in a string representation of a `Date`, use ``Date/FormatStyle/weekday(_:)``. This example shows a variety of ``Date/FormatStyle/Symbol/Weekday`` format styles applied to a Thursday, using locale `en_US`: ```swift let meetingDate = Date() // Feb 18, 2021 at 3:00 PM meetingDate.formatted(Date.FormatStyle().weekday(.abbreviated)) // Thu meetingDate.formatted(Date.FormatStyle().weekday(.narrow)) // T meetingDate.formatted(Date.FormatStyle().weekday(.short)) // Th meetingDate.formatted(Date.FormatStyle().weekday(.wide)) // Thursday meetingDate.formatted(Date.FormatStyle().weekday(.oneDigit)) // 5 meetingDate.formatted(Date.FormatStyle().weekday(.twoDigits)) // 05 meetingDate.formatted(Date.FormatStyle().weekday()) // Thu ``` If no format is specified as a parameter, the ``Date/FormatStyle/Symbol/Weekday/abbreviated`` static variable is the default format. For more information about formatting dates, see the ``Date/FormatStyle``.
static get abbreviated(): Date_FormatStyle_Symbol_WeekdaySwift declarationstatic var abbreviated: Date.FormatStyle.Symbol.Weekday { get }Abbreviated day of week name. For example, "Tue".
static get wide(): Date_FormatStyle_Symbol_WeekdaySwift declarationstatic var wide: Date.FormatStyle.Symbol.Weekday { get }Wide day of week name. For example, "Tuesday".
static get short(): Date_FormatStyle_Symbol_WeekdaySwift declarationstatic var short: Date.FormatStyle.Symbol.Weekday { get }Short day of week name. For example, "Tu".
static get narrow(): Date_FormatStyle_Symbol_WeekdaySwift declarationstatic var narrow: Date.FormatStyle.Symbol.Weekday { get }Narrow day of week name. For example, "T".
static get omitted(): Date_FormatStyle_Symbol_WeekdaySwift declarationstatic let omitted: Date.FormatStyle.Symbol.WeekdayThe option for not including the symbol in the formatted output.
static get oneDigit(): Date_FormatStyle_Symbol_WeekdaySwift declarationstatic var oneDigit: Date.FormatStyle.Symbol.Weekday { get }Local day of week number/name. The value depends on the local starting day of the week.
static get twoDigits(): Date_FormatStyle_Symbol_WeekdaySwift declarationstatic var twoDigits: Date.FormatStyle.Symbol.Weekday { get }Local day of week number/name, format style; two digits, zero-padded if necessary.
No declarations were skipped in this snapshot.