Date

Methods
8
Fields
None

Getting one

Date.new()

Methods

MethodReturnsDescription
getTime()numberMilliseconds since the epoch.
before(Date)booleanWhether this is before when.
after(Date)booleanWhether this is after when.
compareTo(Date)number-1, 0 or 1.
equals(any)booleanWhether obj is a Date of the same time.
toInstant()InstantDate#toInstant().
toString()stringEEE MMM dd HH:mm:ss zzz yyyy in the system zone.
new()Date() -> Date: Now.
new(number)Date

Returned by

MethodReturnsDescription
DateClass.newDate() -> Date: Now.

Method details

getTime

getTime: (Date) -> number

Milliseconds since the epoch.

equals

equals: (Date, any) -> boolean

Whether obj is a Date of the same time.

toString

toString: (Date) -> string

EEE MMM dd HH:mm:ss zzz yyyy in the system zone.

new

new: (() -> Date) & ((number) -> Date)

() -> Date: Now.

(number) -> Date: date ms after the epoch.