Skip to content

isDateAfter

kherP edited this page Jan 2, 2020 · 2 revisions

This utility compares two dates and return true if the first is greater than the second without considering the time.

Example

const date1 = new Date("May 6, 2019");
const date2 = new Date("May 6, 1952");
const result = isDateAfter(date1, date2);
console.log(result); // true

Properties

Param Type Description
firstDate Date First date
secondDate Date Second date to be compared against
Clone this wiki locally