One Logo Pool Ball
Foundation · IOS API REFERENCE

Date.FormatStyle.Symbol.Hour.AMPMStyle

struct · iOS 15.0+ · SDK 27.1

struct AMPMStyle

The format style of the string representation of the day period, before or after noon, in a date. Possible values for this style are: ``omitted``, ``narrow``, ``abbreviated``, and ``wide``.

Members (4)

get · iOS 15.0+

abbreviated

TypeScript
static get abbreviated(): Date_FormatStyle_Symbol_Hour_AMPMStyle
Swift declaration
static let abbreviated: Date.FormatStyle.Symbol.Hour.AMPMStyle

Abbreviated day period if the locale prefers using day period with hour. For example, `8`, `8 AM`, `13`, `1 PM` if used with `defaultDigits`. Or `08`, `08 AM`, `13`, `01 PM` if used with `twoDigits`.

get · iOS 15.0+

wide

TypeScript
static get wide(): Date_FormatStyle_Symbol_Hour_AMPMStyle
Swift declaration
static let wide: Date.FormatStyle.Symbol.Hour.AMPMStyle

Wide day period if the locale prefers using day period with hour. For example, `8`, `8 A.M.`, `13`, `1 P.M.` if used with `defaultDigits`. Or, `08`, `08 A.M.`, `13`, `01 P.M.` if used with `twoDigits`.

get · iOS 15.0+

narrow

TypeScript
static get narrow(): Date_FormatStyle_Symbol_Hour_AMPMStyle
Swift declaration
static let narrow: Date.FormatStyle.Symbol.Hour.AMPMStyle

Narrow day period if the locale prefers using day period with hour. For example, `8`, `8a`, `13`, `1p` if used with `defaultDigits`. Or `08`, `08a`, `13`, `01p` if used with `twoDigits`.

get · iOS 15.0+

omitted

TypeScript
static get omitted(): Date_FormatStyle_Symbol_Hour_AMPMStyle
Swift declaration
static let omitted: Date.FormatStyle.Symbol.Hour.AMPMStyle

Hides the day period marker (AM/PM). For example, `8` (for 8 in the morning), `1` (for 1 in the afternoon) if used with `defaultDigits`. Or `08`, `01` if used with `twoDigits`.

Skipped declarations

No declarations were skipped in this snapshot.

All Foundation types →