I'm not sure about how to get this done in Javascript. I get an array with objects, where the objects contains a start and enddate (with some more information about name and stuff). So say, I've 5 objects with a certain timespan. The goal is, to know what is the maximum amount of events playing at the same time. So Say I've the following example:
---A--- ---B---
---C--- ---D---
---E---
Think of all the letters have their own start/enddate. So the maximum amount of playing together at the same time, is 3. A, C and E.
The start/enddate can change a lot, and can contain overlap as well. So say I've the following example:
---A--- ---B--- ---C---
---D--- ---E---
---F---
I have the max amount of 3 as well, but then with slighter overlap then the previous example. So C,E and F have the overlap of max 3 objects at the same time.
My question is, how can I arrange this in Javascript with the start/enddate overlap? So I have an array with say 6 objects with different start/enddates. And I need to check where in the whole timeline is the 'max' amount of events playing at the same time.
Thanks a lot!