Checks if a date is after another date.

isDateAfter('2021-01-01', '2020-01-01'); // true
isDateAfter('2020-01-01', '2021-01-01'); // false
  • Parameters

    • date: string | number | Date

      The date to check.

    • dateToCompare: string | number | Date

      The date to compare against.

    Returns boolean

    true if the date is after the date to compare, otherwise false.