Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to add interval time to a workday #74

Open
EsterfanoLopes opened this issue Sep 1, 2021 · 1 comment
Open

Possibility to add interval time to a workday #74

EsterfanoLopes opened this issue Sep 1, 2021 · 1 comment

Comments

@EsterfanoLopes
Copy link

EsterfanoLopes commented Sep 1, 2021

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.

@rickar
Copy link
Owner

rickar commented Sep 4, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants