cal
cal copied to clipboard
Possibility to add interval time to a workday
I was reading the docs and searching in the code if is possible to add an interval time in a Workday.
Like:
c := cal.NewBusinessCalendar()
c.SetWorkHours(time.Hour*9, time.Hour*18)
But from 12 am to 1pm there's an interval where shouldn't be considered as work hours.
How I can do that? If it's not possible, I'll leave as a idea for the future.
There's nothing to support that right now and I think that would require a lot of refactoring to handle. In the meantime, the best alternative I can think of is creating two separate calendars for "morning" (9-12) and "afternoon" (13-18) with the same holidays and adding the results of both together.