BsonDate

Represents a BSON date value (Bson.Type.date).

BSON date values are stored in UNIX time format, counting the number of milliseconds from 1970/01/01.

Constructors

this
this(Date date, TimeZone tz)
this(DateTime date, TimeZone tz)
this(SysTime date)

Constructs a BsonDate from the given date value.

this
this(long unix_time)

Constructs a BsonDate from the given UNIX time.

Members

Functions

opCmp
int opCmp(BsonDate other)

Allows relational and equality comparisons.

opEquals
bool opEquals(BsonDate other)

Allows relational and equality comparisons.

toString
string toString()

Returns the date formatted as ISO extended format.

toSysTime
SysTime toSysTime()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

value
long value [@property getter]
long value [@property setter]

The raw unix time value.

Static functions

fromStdTime
BsonDate fromStdTime(long std_time)

Constructs a BsonDate from the given date/time in standard time as defined in std.datetime.

fromString
BsonDate fromString(string iso_ext_string)

Constructs a BsonDate from the given date/time string in ISO extended format.

Meta