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.
toSysTime
SysTime toSysTime(TimeZone tz)
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