mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-14 15:31:31 +00:00
Add initial Date bindings
Doesn't do much, yet, because we can't get the timezone with a plain binding, but it's at least something.
This commit is contained in:
21
std/portable/index.d.ts
vendored
21
std/portable/index.d.ts
vendored
@ -424,6 +424,27 @@ declare const Math: IMath;
|
||||
declare const Mathf: IMath;
|
||||
declare const JSMath: IMath;
|
||||
|
||||
declare class Date {
|
||||
/** Returns the UTC timestamp in milliseconds of the specified date. */
|
||||
static UTC(
|
||||
year: i32,
|
||||
month: i32,
|
||||
day: i32,
|
||||
hour: i32,
|
||||
minute: i32,
|
||||
second: i32,
|
||||
millisecond: i32
|
||||
): number;
|
||||
/** Returns the current UTC timestamp in milliseconds. */
|
||||
static now(): number;
|
||||
/** Constructs a new date object from an UTC timestamp in milliseconds. */
|
||||
constructor(value: number);
|
||||
/** Returns the UTC timestamp of this date in milliseconds. */
|
||||
getTime(): number;
|
||||
/** Sets the UTC timestamp of this date in milliseconds. */
|
||||
setTime(value: number): void;
|
||||
}
|
||||
|
||||
declare namespace console {
|
||||
/** @deprecated */
|
||||
function log(message: string): void;
|
||||
|
Reference in New Issue
Block a user