isEqual

A function that compares two dates. The comparison also includes the time portion.

isEqual(new Date(2016, 0, 1), new Date(2016, 0, 1)); // true
isEqual(new Date(2016, 0, 1), new Date(2016, 0, 2)); // false
isEqual(new Date(2016, 0, 1, 10), new Date(2016, 0, 1, 20)); // false

Parameters

candidate Date

The candidate date.

expected Date

The expected date.

Returns

boolean - A Boolean value indicating whether the values are equal.

 /