Represents a date.

Constructors

Properties

Accessors

Constructors

  • Parameters

    • day: number
    • month: number
    • year: number

    Returns Date

Properties

day: number
fromStamp: (stamp: null | number) => null | Date

Converts a stamp value to a date object.

Type declaration

    • (stamp: null | number): null | Date
    • Parameters

      • stamp: null | number

        The number of days since '1970-01-01' to convert.

      Returns null | Date

      • The converted date object.
month: number
toStamp: () => number

Calculates the number of days from 1970-01-01 to a specified date.

Type declaration

    • (): number
    • Returns number

      The number of days from 1970-01-01 to the specified date.

toString: () => null | string

Returns a string representation of the current object.

Type declaration

    • (): null | string
    • Returns null | string

      The serialized string representation of the object.

year: number

Accessors

  • get isValid(): boolean

    Check if date is valid

    Returns boolean