Checks if two Date objects fall on the same calendar day.
The first date.
The second date.
true if both dates are on the same day, otherwise false.
true
false
const result = isSameDay(new Date('2024-05-01'), new Date('2024-05-01'));// result === true Copy
const result = isSameDay(new Date('2024-05-01'), new Date('2024-05-01'));// result === true
Checks if two Date objects fall on the same calendar day.