rickar/cal

Business hours and business days

Closed this issue · 4 comments

Hello,

Let's say I have this use case :

Start Date : Friday 5pm
Duration : 4 hours
Working hours of a day : 8am -> 6pm
Skip weekend : true

I want to add the duration to my start date and get an end date, but without adding the non-working hours. So, in my case, the calculated end date would be : Monday 11am.

Can I achieve this with your library please ?
Thank a lot !

Unfortunately that can't be done currently. There's no support for working hours in a day. I believe AddSkipNonWorkdays is closest to what you're looking for.

Thanks for your answer, is it something you would plan to add maybe ? That could be a great feature !

Maybe, if I can think of a relatively clean way of incorporating it. I don't really want to get into handling time zones and daylight savings if I can help it. I can see the benefit of adding operating hours in general though.

Thanks :)