@tsdotnet/date-time - v1.1.0
    Preparing search index...

    Class DateTime

    Implements

    Index

    Constructors

    Accessors

    • get calendarMonth(): number

      Returns the month number (1-12).

      Returns number

    • get day(): number

      Returns the day of the month. An integer between 1 and 31.

      Returns number

    • get dayIndex(): number

      Returns the day of the month indexed starting at zero.

      Returns number

    Methods

    • Compares a JS Date with the current instance. Does not evaluate the kind.

      Parameters

      • other: Date

      Returns boolean

    • Compares another JsDateConvertible object and returns true if they or their value are equal.

      Parameters

      • other: JsDateConvertible

        The other JsDateConvertible object.

      • Optionalstrict: boolean

        When strict is true, the 'kind' also must match.

      Returns boolean

    • Returns the number of days for the specific year and month.

      Parameters

      Returns number

    • Calculates if the given year is a leap year using the formula: ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)

      Parameters

      • year: number

      Returns boolean