• Returns whether the date or year is a leap year

    Parameters

    • OptionaldateYear: number | Date

      the date or year to check

    Returns boolean

    whether the date or year is a leap year

    isLeapYear(2000);    // true
    isLeapYear(new Date(2000, 0, 1)); // true