title: Multiple Date range comparison for overlap: how to do it efficiently?
body: <p>To check for overlap in two different dateranges, <code>{Start1, End1}</code> and <code>{Start2, End2}</code> I am checking:</p>
  
  <pre><code>if ((Start1 &lt;= End2) &amp;&amp; (End1 &gt;= Start2))
  {
    //overlap exists
  }
  </code></pre>
  
  <p>The question is, 
  <strike>what is a good way to compare overlaps if I had let's say five dateranges?</strike>.</p>
  
  <p><strike>checking to see if any of them don't overlap each other?</strike></p>
  
  <p>If I have multiple date ranges, how to find if any of these ranges are overlapping?</p>