Skip to content

isSameDate

kherP edited this page Jan 2, 2020 · 2 revisions

This utility compares two dates and return true if the both dates are equal without considering the time.

Example

const date1 = new Date("May 6, 1952");
const date2 = new Date("May 6, 1952");
const result = isSameDate(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