DictionaryDateDecodingStrategy
public enum DictionaryDateDecodingStrategy
The strategies available for formatting dates when decoding them from Dictionary.
-
The strategy that uses formatting from the Date structure.
Declaration
Swift
case deferredToDate
-
The strategy that decodes dates in terms of seconds since midnight UTC on January 1st, 1970.
Declaration
Swift
case secondsSince1970
-
The strategy that decodes dates in terms of milliseconds since midnight UTC on January 1st, 1970.
Declaration
Swift
case millisecondsSince1970
-
The strategy that formats dates according to the ISO 8601 standard.
Declaration
Swift
case iso8601
-
The strategy that defers formatting settings to a supplied date formatter.
Declaration
Swift
case formatted(DateFormatter)
-
The strategy that formats custom dates by calling a user-defined function.
Declaration
Swift
case custom((_ decoder: Decoder) throws -> Date)