DateCodingStrategy
public enum DateCodingStrategy : RawRepresentableEnum representing the various encoding/decoding strategy pairs for Dates.
 Set these on a MongoClient, MongoDatabase, or MongoCollection so that the strategies will be applied when
 converting Dates between their BSON representations and their representations in (non BSONDocument) Codable
 types.
As per the BSON specification, the default strategy is to encode Dates as BSON datetime objects.
See also
bsonspec.org- 
                  
                  DeclarationSwift public typealias RawValue = (encoding: BSONEncoder.DateEncodingStrategy, decoding: BSONDecoder.DateDecodingStrategy)
- 
                  
                  Encode/decode the Dateby deferring to its default encoding/decoding implementations.DeclarationSwift case deferredToDate
- 
                  
                  Encode/decode the Dateto/from a BSON datetime object (default).DeclarationSwift case bsonDateTime
- 
                  
                  Encode/decode the Dateto/from a 64-bit integer counting the number of milliseconds since January 1, 1970.DeclarationSwift case millisecondsSince1970
- 
                  
                  Encode/decode the Dateto/from a BSON double counting the number of seconds since January 1, 1970.DeclarationSwift case secondsSince1970
- 
                  
                  Encode/decode the Dateto/from an ISO-8601-formatted string (in RFC 339 format).DeclarationSwift case iso8601
- 
                  
                  Encode/decode the Dateto/from a string formatted by the given formatter.DeclarationSwift case formatted(DateFormatter)
- 
                  
                  Encode the Dateby using the givenencodeFunc. Decode theDateby using the givendecodeFunc. IfencodeFuncdoes not encode a value, an empty document will be encoded in its place.DeclarationSwift case custom(encodeFunc: (Date, Encoder) throws -> Void, decodeFunc: (Decoder) throws -> Date)
- 
                  
                  DeclarationSwift public init?(rawValue: RawValue)
- 
                  
                  DeclarationSwift public var rawValue: RawValue { get }
 View on GitHub
            View on GitHub
           Install in Dash
            Install in Dash
           DateCodingStrategy Enumeration Reference
      DateCodingStrategy Enumeration Reference