abbreviated
TypeScriptstatic get abbreviated(): Date_FormatStyle_DateStyleSwift declarationstatic let abbreviated: Date.FormatStyle.DateStyleShows date components in their abbreviated form if possible. For example, "Oct 21, 2015".
struct · iOS 15.0+ · SDK 27.1
struct DateStyleType that defines date styles varied in length or components included. The exact format depends on the locale. Possible values of date style include ``omitted``, ``numeric``, ``abbreviated``, ``long``, and ``complete``. The following code sample shows a variety of date style format results using the `en_US` locale. ```swift let meetingDate = Date() meetingDate.formatted(date: .omitted, time: .standard) // 9:42:14 AM meetingDate.formatted(date: .numeric, time: .omitted) // 10/17/2020 meetingDate.formatted(date: .abbreviated, time: .omitted) // Oct 17, 2020 meetingDate.formatted(date: .long, time: .omitted) // October 17, 2020 meetingDate.formatted(date: .complete, time: .omitted) // Saturday, October 17, 2020 meetingDate.formatted() // 10/17/2020, 9:42 AM ``` The default date style is `numeric`.
static get abbreviated(): Date_FormatStyle_DateStyleSwift declarationstatic let abbreviated: Date.FormatStyle.DateStyleShows date components in their abbreviated form if possible. For example, "Oct 21, 2015".
static get long(): Date_FormatStyle_DateStyleSwift declarationstatic let long: Date.FormatStyle.DateStyleShows date components in their long form if possible. For example, "October 21, 2015".
static get numeric(): Date_FormatStyle_DateStyleSwift declarationstatic let numeric: Date.FormatStyle.DateStyleShows date components in their numeric form. For example, "10/21/2015".
static get omitted(): Date_FormatStyle_DateStyleSwift declarationstatic let omitted: Date.FormatStyle.DateStyleExcludes the date part.
static get complete(): Date_FormatStyle_DateStyleSwift declarationstatic let complete: Date.FormatStyle.DateStyleShows the complete day. For example, "Wednesday, October 21, 2015".
No declarations were skipped in this snapshot.