From 86655d78bbb14d5c78d54158cf4fde1df0455893 Mon Sep 17 00:00:00 2001 From: Tarang Date: Thu, 16 Mar 2023 13:11:21 +1100 Subject: [PATCH] Update cal_business.go --- v2/cal_business.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v2/cal_business.go b/v2/cal_business.go index 00772c3..9b0e770 100644 --- a/v2/cal_business.go +++ b/v2/cal_business.go @@ -120,7 +120,8 @@ func (c *BusinessCalendar) IsWorkTime(date time.Time) bool { } h, m, s := date.Clock() - return (h == startHour && m >= startMinute && s >= startSecond) || + return (h == startHour && m == startMinute && s >= startSecond) || + (h == startHour && m > startMinute) || (h > startHour && h < endHour) || (h == endHour && m < endMinute) || (h == endHour && m == endMinute && s <= endSecond)