From 5a7732382026b49a012e8002db73c3f25c03e962 Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Wed, 15 Nov 2023 16:42:37 +0530 Subject: [PATCH] Update date-helper.js replacing Math.floor with Math.round --- src/helpers/date-helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/date-helper.js b/src/helpers/date-helper.js index 482440431..b5afc535c 100644 --- a/src/helpers/date-helper.js +++ b/src/helpers/date-helper.js @@ -5,7 +5,7 @@ export function getDateDifferenceInDays(startDate, endDate) { // Use the built-in method to get the difference in milliseconds var difference = date1 - date2; // Convert milliseconds to days and return the result - return Math.floor(difference / (1000 * 3600 * 24)); + return Math.round(difference / (1000 * 3600 * 24)); } export function get12HourTimeFormat(time) { // Check correct time format and split into components