Class Date

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(timezone?: string): Date

Parameters

  • timezone?: string optional

Returns

Date

constructor(date: Object, timezone?: string): Date

Parameters

  • date: Object
  • timezone?: string optional

Returns

Date

constructor(utcMillis: number, timezone?: string): Date

Parameters

  • utcMillis: number
  • timezone?: string optional

Returns

Date

constructor(time: string, timezone?: string): Date

Parameters

  • time: string
  • timezone?: string optional

Returns

Date

constructor(year?: number, month?: number, day?: number, hour?: number, minute?: number, second?: number, millisecond?: number, timezone?: string): Date

Parameters

  • year?: number optional
  • month?: number optional
  • day?: number optional
  • hour?: number optional
  • minute?: number optional
  • second?: number optional
  • millisecond?: number optional
  • timezone?: string optional

Returns

Date

Properties

public setTimezone: (timezone: string) => void

Methods

public getDate(): number

Returns

number

public getDay(): number

Returns

number

public getFullYear(): number

Returns

number

public getHours(): number

Returns

number

public getMilliseconds(): number

Returns

number

public getMinutes(): number

Returns

number

public getMonth(): number

Returns

number

public getSeconds(): number

Returns

number

public getTime(): number

Returns

number

public getTimezoneOffset(): number

Returns

number

public getUTCDate(): number

Returns

number

public getUTCDay(): number

Returns

number

public getUTCFullYear(): number

Returns

number

public getUTCHours(): number

Returns

number

public getUTCMilliseconds(): number

Returns

number

public getUTCMinutes(): number

Returns

number

public getUTCMonth(): number

Returns

number

public getUTCSeconds(): number

Returns

number

public setDate(date: number): number

Parameters

  • date: number

Returns

number

public setFullYear(year: number, month?: number, date?: number): number

Parameters

  • year: number
  • month?: number optional
  • date?: number optional

Returns

number

public setHours(hours: number, min?: number, sec?: number, ms?: number): number

Parameters

  • hours: number
  • min?: number optional
  • sec?: number optional
  • ms?: number optional

Returns

number

public setMilliseconds(ms: number): number

Parameters

  • ms: number

Returns

number

public setMinutes(min: number, sec?: number, ms?: number): number

Parameters

  • min: number
  • sec?: number optional
  • ms?: number optional

Returns

number

public setMonth(month: number, date?: number): number

Parameters

  • month: number
  • date?: number optional

Returns

number

public setSeconds(sec: number, ms?: number): number

Parameters

  • sec: number
  • ms?: number optional

Returns

number

public setTime(time: number): number

Parameters

  • time: number

Returns

number

public setUTCDate(date: number): number

Parameters

  • date: number

Returns

number

public setUTCFullYear(year: number, month?: number, date?: number): number

Parameters

  • year: number
  • month?: number optional
  • date?: number optional

Returns

number

public setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number

Parameters

  • hours: number
  • min?: number optional
  • sec?: number optional
  • ms?: number optional

Returns

number

public setUTCMilliseconds(ms: number): number

Parameters

  • ms: number

Returns

number

public setUTCMinutes(min: number, sec?: number, ms?: number): number

Parameters

  • min: number
  • sec?: number optional
  • ms?: number optional

Returns

number

public setUTCMonth(month: number, date?: number): number

Parameters

  • month: number
  • date?: number optional

Returns

number

public setUTCSeconds(sec: number, ms?: number): number

Parameters

  • sec: number
  • ms?: number optional

Returns

number

public toDateString(): string

Returns

string

public toISOString(): string

Returns

string

public toJSON(key?: any): string

Parameters

  • key?: any optional

Returns

string

public toLocaleDateString(): string

Returns

string

public toLocaleString(): string

Returns

string

public toLocaleTimeString(): string

Returns

string

public toString(): string

Returns

string

public toTimeString(): string

Returns

string

public toUTCString(): string

Returns

string

public valueOf(): number

Returns

number