init(from:)
- iOS
- 15.0+
- macOS
- 12.0+
- tvOS
- 15.0+
- watchOS
- 8.0+
init(from decoder: any Decoder) throws
init(from decoder: any Decoder) throws
s20FoundationEssentials4DateV0A20InternationalizationE11FormatStyleV6SymbolV4HourV9AMPMStyleV4fromALs7Decoder_p_tKcfc
What are these?HXLO
import FoundationEssentials
import FoundationInternationalization
struct AMPMStyle
struct Date
Date
represents a single point in time.
struct FormatStyle
Strategies for formatting a Date
.
struct Symbol
struct Hour
protocol Decoder
A type that can decode values from a native format into in-memory representations.
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
.
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
.
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
.
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
.