Skip to content

Datetime

Datetime . fromIsoDate ( isoDate )  -> DateTime

Creates a new DateTime from an ISO 8601 date-time string.

Parameters

isoDate: string

Returns

DateTime
Datetime . fromUnixTimestamp ( unixTimestamp )  -> DateTime

Creates a new DateTime from the given UNIX timestamp.

This timestamp may contain both a whole and fractional part - where the fractional part denotes milliseconds / nanoseconds.

Parameters

unixTimestamp: number

Returns

DateTime
Datetime . now ( )  -> DateTime

Returns a DateTime representing the current moment in time.

Returns

DateTime