Files
ente/web/packages/base/date.ts
2025-06-23 17:55:43 +05:30

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();