Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

181
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda