bunkat / schedule

Automatically schedules tasks, work items, meetings, reservations, etc. Schedule takes into account working hours, holidays/days off, people's work schedule/vacation time, as well as task dependencies.
http://bunkat.github.io/schedule/
MIT License
427 stars 87 forks source link

Get un-available dates #10

Open klh opened 8 years ago

klh commented 8 years ago

Is there a way to create a list of ressources with available times, and create a query with a task say: {task:'sometask',duration:'120Min'}

and then get unavailable dates (in days) back, meaning getting a negative result where you only extract dates where the task does not fit in. ?

bunkat commented 8 years ago

I thnk you would need to convert your schedule to an exception schedule and then attempt to schedule that. If the exception schedule was the inverse of the normal schedule, the days that the exception schedule works would be the days that the standard schedule would not fit.

You could also just schedule the normal task and the manually iterate over the days to determine which days it did not work on.

klh commented 8 years ago

Thanks Bun, Do you know of a maintained alternative to schedule.js ? having my darndest time finding one.

Allthough this fits the bill...but...

bunkat commented 8 years ago

I know of no other alternatives (which is why I originally developed this library). Unfortunately I ported it over to Go a long time ago for my uses and no longer have any time to spend on this one.