Enumeration Casehummingbird 2.3.0Hummingbird
iso8601
Encode the Date
as an ISO-8601-formatted string (in RFC 3339 format).
case iso8601
Other cases
case deferredToDate
Defer to
Date
for encoding. This is the default strategy.case secondsSince1970
Encode the
Date
as a UNIX timestamp from a JSON number.case millisecondsSince1970
Encode the
Date
as UNIX millisecond timestamp from a JSON number.case formatted(DateFormatter)
Encode the
Date
as a string parsed by the given formatter.case custom((Date, Encoder) throws -> Void)
Encode the
Date
as a custom value encoded by the given closure.