Skip to content

Commit

Permalink
Merge pull request #113 from Tarang/patch-2
Browse files Browse the repository at this point in the history
Fix bug with isWorkTime
  • Loading branch information
rickar committed Apr 5, 2023
2 parents 5cbae22 + 86655d7 commit 0d2b5bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion v2/cal_business.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0d2b5bc

Please sign in to comment.