StructureFoundationInternationalization
Date.FormatStyle.Symbol.Hour.AMPMStyle
iOS 15.0+
iPadOS 15.0+
Mac Catalyst 15.0+
macOS 12.0+
tvOS 15.0+
watchOS 8.0+
The format style of the string representation of the day period, before or after noon, in a date.
struct AMPMStyle
Overview
Possible values for this style are: omitted, narrow, abbreviated, and wide.
Topics
Initializers
Type Properties
static let abbreviated: Date.FormatStyle.Symbol.Hour.AMPMStyleAbbreviated day period if the locale prefers using day period with hour. For example,8,8 AM,13,1 PMif used withdefaultDigits. Or08,08 AM,13,01 PMif used withtwoDigits.static let narrow: Date.FormatStyle.Symbol.Hour.AMPMStyleNarrow day period if the locale prefers using day period with hour. For example,8,8a,13,1pif used withdefaultDigits. Or08,08a,13,01pif used withtwoDigits.static let omitted: Date.FormatStyle.Symbol.Hour.AMPMStyleHides the day period marker (AM/PM). For example,8(for 8 in the morning),1(for 1 in the afternoon) if used withdefaultDigits. Or08,01if used withtwoDigits.static let wide: Date.FormatStyle.Symbol.Hour.AMPMStyleWide day period if the locale prefers using day period with hour. For example,8,8 A.M.,13,1 P.M.if used withdefaultDigits. Or,08,08 A.M.,13,01 P.M.if used withtwoDigits.
Relationships
Conforms To
Swift.DecodableSwift.EncodableSwift.EquatableSwift.HashableSwift.SendableSwift.SendableMetatype