Date

Represents a date. Date is defined with number of days since the Unix epoch. Uses a std.datetime.date.Date internally.

Constructors

this
this(Date other)

Create a shallow 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 pointer.

Alias This

date_

Members

Functions

days
auto days()

Returns days since Unix epoch.

opEquals
auto opEquals(Date other)

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

ptr
auto ptr()

Return pointer to internal mg_date.

toHash
size_t toHash()

Return the hash code for this date.

toString
string toString()

Return a printable string representation of this date.

Meta