8 lines
264 B
TypeScript
8 lines
264 B
TypeScript
/**
|
|
* Return `true` if both the given dates have the same day.
|
|
*/
|
|
export const isSameDay = (first: Date, second: Date) =>
|
|
first.getFullYear() === second.getFullYear() &&
|
|
first.getMonth() === second.getMonth() &&
|
|
first.getDate() === second.getDate();
|