From e4b2464548944bc3d9be044103c1052e8d31cc82 Mon Sep 17 00:00:00 2001 From: "gitstart-app[bot]" <57568882+gitstart-app[bot]@users.noreply.github.com> Date: Thu, 9 Nov 2023 18:43:48 -0300 Subject: [PATCH] fix: Fix "could not book the meeting" issue (fix-confirmBookingIssue) (#12305) Co-authored-by: gitstart-calcom Co-authored-by: GitStart-Cal.com <121884634+gitstart-calcom@users.noreply.github.com> --- packages/lib/date-ranges.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/lib/date-ranges.ts b/packages/lib/date-ranges.ts index 71e1ab3cbe1cc0..1032bba1bd1d3d 100644 --- a/packages/lib/date-ranges.ts +++ b/packages/lib/date-ranges.ts @@ -47,11 +47,7 @@ export function processWorkingHours({ const startResult = dayjs.max(start, dateFrom.tz(timeZone)); const endResult = dayjs.min(end, dateTo.tz(timeZone)); - const isLater = - startResult.isAfter(endResult, "hour") || - (startResult.isSame(endResult, "hour") && startResult.isAfter(endResult, "minute")); - - if (isLater) { + if (endResult.isBefore(startResult)) { // if an event ends before start, it's not a result. continue; }