Our powerful JS Calendar component


Post by asharafshahi »

Hi,
I have an application where the end user on the web application schedules a bunch of events (some recurring) on a calendar and later an automated process queries my API backend to see what events are coming up in the next few hours. Since some events are individually scheduled and some are recurring events with a multitude of possible recurrence settings, I have the challenging task of computing what is actually happening in the next 1, 2, 3, hours, etc.

Your library seems to have this computation logic already solved since you are able to render a calendar of events with all the different possible recurrence taken into account. Do you make this logic available to us in any way? I basically need a method/library that I can implement in my backend to answer the question of 'what are the next n events on the schedule for the next x hours?' If there is no such logic exported, do you have any other suggestion on how to approach this problem?

Thanks for the help,
Arman


Post by arcady »

You can check classes in lib/Scheduler/data/util/recurrence folder.
They implement so called iterators for Daily/Weekly/Monthly/... modes.
I think investigating of their code should give you an idea on how to implement that on the server.


Post Reply