Enumeration
XMLDecoder.DateDecodingStrategy
public enum DateDecodingStrategy
The strategy to use for decoding Date
values.
Relationships
Member Of
XMLDecoder
XMLDecoder
facilitates the decoding of XML into semanticDecodable
types.
Enumeration Cases
secondsSince1970
case secondsSince1970
Decode the Date
as a UNIX timestamp from a XML number. This is the default strategy.
millisecondsSince1970
case millisecondsSince1970
Decode the Date
as UNIX millisecond timestamp from a XML number.
iso8601
@available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
case iso8601
Decode the Date
as an ISO-8601-formatted string (in RFC 3339 format).
custom
case custom((_ decoder: Decoder) throws -> Date)
Decode the Date
as a custom box decoded by the given closure.