Enumeration

JSONDecoder.DateDecodingStrategy

The strategies available for formatting dates when decoding them from JSON.

Topics

Default Formats

case deferredToDate

The strategy that uses formatting from the Date structure.

Standard Formats

case iso8601

The strategy that formats dates according to the ISO 8601 standard.

Custom Formats

case formatted(DateFormatter)

The strategy that defers formatting settings to a supplied date formatter.

case custom((Decoder) )

The strategy that formats custom dates by calling a user-defined function.

Epoch Formats

case millisecondsSince1970

The strategy that decodes dates in terms of milliseconds since midnight UTC on January 1st, 1970.

case secondsSince1970

The strategy that decodes dates in terms of seconds since midnight UTC on January 1st, 1970.

See Also

Decoding Dates

var dateDecodingStrategy: JSONDecoder.DateDecodingStrategy

The strategy used when decoding dates from part of a JSON object.