Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (14 sloc) 790 Bytes
description
Represents timestamps.

Date

API

The Date API is still preliminary and requires importing the Date object from the host (as Date).

Static

  • Date.now(): i64 Returns the current UTC timestamp in milliseconds
  • Date.UTC(year: i32, month?: i32, day?: i32, hour?: i32, minute?: i32, second?: i32, millisecond?: i64): i64 Returns the UTC timestamp in milliseconds of the specified date.

Constructor

  • new Date(value: i64) Constructs a new date object from an UTC timestamp in milliseconds.

Instance

  • Date#getTime(): i64 Gets the UTC timestamp of this date in milliseconds.
  • Date#setTime(value: i64): i64 Sets the UTC timestamp of this date in milliseconds and returns the timestamp.
You can’t perform that action at this time.