Returns true if two dates fall on the same calendar day (local time).
true
First date.
Second date.
isSameDay(new Date("2024-06-15T08:00"), new Date("2024-06-15T22:00")) // => trueisSameDay(new Date("2024-06-15"), new Date("2024-06-16")) // => false Copy
isSameDay(new Date("2024-06-15T08:00"), new Date("2024-06-15T22:00")) // => trueisSameDay(new Date("2024-06-15"), new Date("2024-06-16")) // => false
Returns
trueif two dates fall on the same calendar day (local time).