abbreviated
TypeScriptstatic get abbreviated(): Date_FormatStyle_Symbol_MonthSwift declarationstatic var abbreviated: Date.FormatStyle.Symbol.Month { get }Abbreviated month name. For example, "Sep".
struct · iOS 15.0+ · SDK 27.1
struct MonthA type that specifies a format for the month in a date format style. The type ``Date/FormatStyle/Symbol/Month`` includes static factory variables that create custom ``Date/FormatStyle/Symbol/Month`` objects: |Factory variable|Description| |---|---| | ``abbreviated`` | Abbreviated month name. For example, `Sep`. | | ``defaultDigits`` | Minimum number of digits that represents the numeric month. For example, `9`, `12`. | | ``narrow`` | Narrow month name. For example, `S`. | | ``twoDigits`` | Two-digit numeric month, zero-padded if necessary. For example, `09`, `12`. | | ``wide`` | Wide month name. For example, `September`. | To customize the month format in a string representation of a `Date`, use ``Date/FormatStyle/month(_:)``. The following example shows a variety of ``Date/FormatStyle/Symbol/Month`` format styles applied to a date. ```swift let meetingDate = Date() // Feb 9, 2021 at 3:00 PM meetingDate.formatted(Date.FormatStyle().month(.abbreviated)) // Feb meetingDate.formatted(Date.FormatStyle().month(.narrow)) // F meetingDate.formatted(Date.FormatStyle().month(.defaultDigits)) // 2 meetingDate.formatted(Date.FormatStyle().month(.twoDigits)) // 02 meetingDate.formatted(Date.FormatStyle().month(.wide)) // February meetingDate.formatted(Date.FormatStyle().month()) // Feb ``` If no format is specified as a parameter, the ``abbreviated`` static variable is the default format. For more information about formatting dates, see the ``Date/FormatStyle``.
static get abbreviated(): Date_FormatStyle_Symbol_MonthSwift declarationstatic var abbreviated: Date.FormatStyle.Symbol.Month { get }Abbreviated month name. For example, "Sep".
static get defaultDigits(): Date_FormatStyle_Symbol_MonthSwift declarationstatic var defaultDigits: Date.FormatStyle.Symbol.Month { get }Minimum number of digits that shows the numeric month. Intended to be used in conjunction with `Day.defaultDigits`. For example, `9`, `12`.
static get wide(): Date_FormatStyle_Symbol_MonthSwift declarationstatic var wide: Date.FormatStyle.Symbol.Month { get }Wide month name. For example, "September".
static get narrow(): Date_FormatStyle_Symbol_MonthSwift declarationstatic var narrow: Date.FormatStyle.Symbol.Month { get }Narrow month name. For example, "S".
static get omitted(): Date_FormatStyle_Symbol_MonthSwift declarationstatic let omitted: Date.FormatStyle.Symbol.MonthThe option for not including the symbol in the formatted output.
static get twoDigits(): Date_FormatStyle_Symbol_MonthSwift declarationstatic var twoDigits: Date.FormatStyle.Symbol.Month { get }2 digits, zero pad if needed. For example, `09`, `12`.
No declarations were skipped in this snapshot.