From 9365e5bfb90553b19ed779449be5d0bc632e4574 Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Thu, 9 Dec 2021 19:01:39 +0530 Subject: [PATCH] Fix bug Signed-off-by: Ajay Bura --- src/util/common.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/util/common.js b/src/util/common.js index d7f4c365..c3745838 100644 --- a/src/util/common.js +++ b/src/util/common.js @@ -14,7 +14,11 @@ export function diffMinutes(dt2, dt1) { } export function isInSameDay(dt2, dt1) { - return (dt2.setHours(0, 0, 0, 0) === dt1.setHours(0, 0, 0, 0)); + return ( + dt2.getFullYear() === dt1.getFullYear() + && dt2.getMonth() === dt1.getMonth() + && dt2.getDate() === dt1.getDate() + ); } export function getEventCords(ev) {