DateEncodingStrategy

public enum DateEncodingStrategy

The strategy to use for encoding Date values.

  • The raw Date instance is encoded in the ADRecord and is handled directly by a SQL Data Provider. This is the default strategy.

    Declaration

    Swift

    case rawDate
  • Defer to Date for choosing an encoding.

    Declaration

    Swift

    case deferredToDate
  • Encode the Date as a UNIX timestamp (as a JSON number).

    Declaration

    Swift

    case secondsSince1970
  • Encode the Date as UNIX millisecond timestamp (as a JSON number).

    Declaration

    Swift

    case millisecondsSince1970
  • Encode the Date as an ISO-8601-formatted string (in RFC 3339 format).

    Declaration

    Swift

    case iso8601
  • Encode the Date as a string formatted by the given formatter.

    Declaration

    Swift

    case formatted(DateFormatter)