DatabaseDateEncodingStrategy

public enum DatabaseDateEncodingStrategy

DatabaseDateEncodingStrategy specifies how EncodableRecord types that also adopt the standard Encodable protocol encode their Date properties.

For example:

struct Player: EncodableRecord, Encodable {
    static let databaseDateEncodingStrategy = DatabaseDateEncodingStrategy.timeIntervalSince1970

    var name: String
    var registrationDate: Date // encoded as an epoch timestamp
}