DateConstructor | typescript
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • DateConstructor

Callable

  • __call(): string
  • Returns string

Index

Constructors

Properties

Methods

Constructors

constructor

  • new DateConstructor(): Date
  • new DateConstructor(value: number): Date
  • new DateConstructor(value: string): Date
  • new DateConstructor(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date
  • Returns Date

  • Parameters

    • value: number

    Returns Date

  • Parameters

    • value: string

    Returns Date

  • Parameters

    • year: number
    • month: number
    • Optional date: number
    • Optional hours: number
    • Optional minutes: number
    • Optional seconds: number
    • Optional ms: number

    Returns Date

Properties

prototype

prototype: Date

Methods

UTC

  • UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number
  • Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.

    Parameters

    • year: number

      The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.

    • month: number

      The month as an number between 0 and 11 (January to December).

    • Optional date: number

      The date as an number between 1 and 31.

    • Optional hours: number

      Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour.

    • Optional minutes: number

      Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes.

    • Optional seconds: number

      Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds.

    • Optional ms: number

      An number from 0 to 999 that specifies the milliseconds.

    Returns number

now

  • now(): number
  • Returns number

parse

  • parse(s: string): number
  • Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.

    Parameters

    • s: string

      A date string

    Returns number

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc