Date
struct Date : ReferenceConvertible, Comparable, Equatable
An extension of Date
to represent the BSON Datetime type. Supports millisecond level precision.
-
Declaration
Swift
public var bsonType: BSONType { get }
-
Initializes a new
Date
representing the instancemsSinceEpoch
milliseconds since the Unix epoch.Declaration
Swift
public init(msSinceEpoch: Int64)
-
The number of milliseconds after the Unix epoch that this
Date
occurs.Declaration
Swift
public var msSinceEpoch: Int64 { get }
-
Declaration
Swift
public func encode(to storage: DocumentStorage, forKey key: String) throws
-
Declaration
Swift
public static func from(iterator iter: DocumentIterator) throws -> Date