Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

180
Views
How to get maximum events playing at same time based on dates

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!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!