Function isDate

  • Checks if a given value is a valid Date object.

    Example

    isDate(new Date('2023-03-16'))
    // => true

    isDate(new Date())
    // => true

    isDate(true)
    // => false

    Type Parameters

    • T

      The type of the input value.

    Parameters

    • value: T

      The value to be checked.

    Returns value is Extract<T, Date>

    true if the given value is a Date object, false otherwise.

Generated using TypeDoc v0.24.7