Class Timestamp

Represents a timestamp as a specific point in time (Date).

Hierarchy

  • Timestamp

Constructors

Properties

Methods

Constructors

  • Creates a new instance of Timestamp with the specified Date.

    Parameters

    • date: Date

      The Date object representing the timestamp.

    Returns Timestamp

Properties

date: Date

The Date object representing the timestamp.

Methods

  • Returns the underlying Date object of the timestamp.

    Returns

    The Date object representing the timestamp.

    Returns Date

  • Converts the timestamp to a JSON string (ISO 8601 format).

    Returns

    A JSON string representing the timestamp.

    Returns string

  • Converts the timestamp to milliseconds (Unix timestamp).

    Returns

    The timestamp in milliseconds.

    Returns number

  • Creates a Timestamp instance from a JSON string.

    Returns

    A Timestamp object.

    Parameters

    • data: string

      The JSON string representing the timestamp in ISO 8601 format.

    Returns Timestamp

Generated using TypeDoc