title: Check if more than two date ranges overlap
body: <p>I have multiple date ranges. I want to check if they are overlapping in javascript. When there are only two it is easy, I use:</p>
  
  <pre><code>if(start_times1 &lt;= end_times2 &amp;&amp; end_times1 &gt;= start_times2) {}
  </code></pre>
  
  <p>But what is the formula when there are more than 2 date ranges?</p>