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

Hierarchy

  • Date

Index

Methods

Methods

__@toPrimitive

  • __@toPrimitive(hint: "default"): string
  • __@toPrimitive(hint: "string"): string
  • __@toPrimitive(hint: "number"): number
  • __@toPrimitive(hint: string): string | number
  • Converts a Date object to a string.

    Parameters

    • hint: "default"

    Returns string

  • Converts a Date object to a string.

    Parameters

    • hint: "string"

    Returns string

  • Converts a Date object to a number.

    Parameters

    • hint: "number"

    Returns number

  • Converts a Date object to a string or number.

    throws

    {TypeError} If 'hint' was given something other than "number", "string", or "default".

    Parameters

    • hint: string

      The strings "number", "string", or "default" to specify what primitive to return.

    Returns string | number

    A number if 'hint' was "number", a string if 'hint' was "string" or "default".

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