Date

Represents a date.

Date is defined with number of days since the Unix epoch.

Constructors

this
this(Date other)

Create a copy of other date.

this
this(Value value)

Create a date from a Value.

this
this(mg_date* ptr)

Create a Date using the given mg_date.

this
this(mg_date* ptr)

Create a Date from a copy of the given mg_date.

Destructor

~this
~this()

Destroys the internal mg_date.

Postblit

this(this)
this(this)

Create a copy of the internal mg_date.

Members

Functions

days
const(long) days()

Returns days since Unix epoch.

opAssign
Date opAssign(Date rhs)

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

opEquals
bool opEquals(Date other)

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

ptr
const(mg_date*) ptr()

Returns the internal mg_date pointer.

toString
const(string) toString()

Return a printable string representation of this date.

Meta