DateCodingStrategy

public enum DateCodingStrategy : RawRepresentable

Enum 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