URLEncodedFormEncoder_DateEncoding - SwiftDocOrg/Alamofire GitHub Wiki

URLEncodedFormEncoder.DateEncoding

Encoding to use for Date values.

public enum DateEncoding

Enumeration Cases

deferredToDate

Defers encoding to the Date type. This is the default encoding.

case deferredToDate

secondsSince1970

Encodes Dates as seconds since midnight UTC on January 1, 1970.

case secondsSince1970

millisecondsSince1970

Encodes Dates as milliseconds since midnight UTC on January 1, 1970.

case millisecondsSince1970

iso8601

Encodes Dates according to the ISO8601 and RFC3339 standards.

case iso8601

formatted

Encodes Dates using the given DateFormatter.

case formatted(:​ DateFormatter)

custom

Encodes Dates using the given closure.

case custom(:​ (Date) throws -> String)