Class DateTime

Constructors

  • Parameters

    • Optional millisecondsSinceEpoch: number

    Returns DateTime

Accessors

  • get Day(): number
  • 1 - 31

    Returns number

  • get DayOfWeek(): DayOfWeek
  • 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.

    Returns DayOfWeek

  • get Hours(): number
  • 0 - 23

    Returns number

  • get Milliseconds(): number
  • 0 - 999

    Returns number

  • get Minutes(): number
  • 0 - 59

    Returns number

  • get Month(): number
  • 1 - 12

    Returns number

  • get Seconds(): number
  • 0 - 59

    Returns number

  • get WeekOfYear(): number
  • ISO

    Returns number

  • get Year(): number
  • Returns number

Methods

  • Parameters

    • value: number

    Returns DateTime

  • Parameters

    • value: number
    • unit: "milliseconds" | "seconds" | "minutes" | "hours" | "days" | "weeks"

    Returns DateTime

  • Parameters

    Returns number

  • Parameters

    • another: DateTime
    • unit: "milliseconds" | "seconds" | "minutes" | "hours" | "days" | "weeks"

    Returns number

  • Parameters

    Returns boolean

  • Parameters

    • value: number

    Returns DateTime

  • Parameters

    • value: number
    • unit: "milliseconds" | "seconds" | "minutes" | "hours" | "days" | "weeks"

    Returns DateTime

  • Returns Date

  • Returns string

  • Parameters

    • Optional format: string

    Returns string

  • Returns string

  • Parameters

    • Optional format: string
    • Optional timezoneOffset: number

    Returns string

  • Returns string

  • Parameters

    • date: Date

    Returns DateTime

  • Parameters

    • date: Date
    • timezoneOffset: number

    Returns DateTime

Generated using TypeDoc