Timestamp

Timestamp type.

Members

Functions

opBinary
Duration opBinary(const(Timestamp) rhs)

calculate duration.

opBinary
Timestamp opBinary(const(Duration) rhs)

add or subtract duration.

opCmp
int opCmp(const(Timestamp) rhs)

Compare two timestmaps.

opEquals
bool opEquals(const(Timestamp) rhs)

Compare two timestmaps.

opOpAssign
void opOpAssign(const(Duration) rhs)

add or subtract duration.

roundDown
Timestamp roundDown(Duration unit)

Round down time by unit duration.

toString
string toString()

Properties

now
Timestamp now [@property getter]

Static functions

fromString
Timestamp fromString(string timestamp)

Parse timestamp.

Variables

stdTime
ulong stdTime;
Undocumented in source.

Examples

immutable t = Timestamp.fromString("2021-01-02T03:04:05.678Z");
assert(t.toString() == "2021-01-02T03:04:05.678+00:00");

Meta