title: Javascript Get Sequential Dates in Array
body: <p>I have an array with the following values (example):</p>
  
  <pre><code>   [
        1367848800000: true,
        1367935200000: true,
        1368021600000: true,
        1368108000000: true,
        1368194400000: true,
        1368367200000: true,
        1368540000000: true,
        1368626400000: true,
        1368712800000: true
      ]
  </code></pre>
  
  <p>Where the index is a date time. The date time will always be at 12:00:00 on a date.</p>
  
  <p>In this example, the first five dates are consecutive, then one day by itself, and then another group of 3 dates. An example of what I mean is below.</p>
  
  <p><img src="https://i.stack.imgur.com/fUGaZ.png" alt="Dates on Calendar"></p>
  
  <p>Now, what I am trying to do is find sequential dates and put them into an array as follows:</p>
  
  <pre><code>   [
        1367848800000,
        1367935200000,
        1368021600000,
        1368108000000,
        1368194400000
     ],
     [
        1368367200000,
        1368540000000,
        1368626400000,
     ],
     [
        1368712800000Ω
     ]
  </code></pre>
  
  <p>So in the end, I have an array, with 3 arrays of all the times. 
  I have tried numerous pieces of code, but everything bugs out and nothing is worth posting on here. Any help would be much appreciated!</p>