DateTime

Represents date and time with its time zone.

Date is defined with seconds since the adjusted Unix epoch. Time is defined with nanoseconds since midnight. Time zone is defined with minutes from UTC.

Constructors

this
this(DateTime other)

Create a deep copy of other date time.

this
this(Value value)

Create a date time from a Value.

this
this(mg_date_time* ptr)

Create a DateTime using the given mg_date_time.

this
this(mg_date_time* ptr)

Create a DateTime from a copy of the given mg_date_time.

Destructor

~this
~this()
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Functions

nanoseconds
const(long) nanoseconds()

Returns nanoseconds since midnight.

opAssign
DateTime opAssign(DateTime rhs)

Assigns a date time to another. The target of the assignment gets detached from whatever date time it was attached to, and attaches itself to the new date time.

opEquals
bool opEquals(DateTime other)

Compares this date time with other. Return: true if same, false otherwise.

ptr
const(mg_date_time*) ptr()
Undocumented in source. Be warned that the author may not have intended to support it.
seconds
const(long) seconds()

Returns seconds since Unix epoch.

toString
const(string) toString()

Return a printable string representation of this date time.

tz_offset_minutes
const(long) tz_offset_minutes()

Returns time zone offset in minutes from UTC.

Meta