title: How to sort an array of objects by date range and creation date?
body: <p>I'm building a task list system, but for the life of me I can't figure out a way to sort an array of objects with a start and end date.</p>
  
  <p>I want to default the task list by the task's creation date, and work on oldest tasks first.</p>
  
  <p>I dont want to start a task until it is at least on the start date.</p>
  
  <p>I want to complete a task a day before the end date.</p>
  
  <p>Sorting the dates by start date is easy using underscorejs:</p>
  
  <pre><code>_.sortBy(arr, function(task) { 
      return task.start.dateTime; 
  })
  </code></pre>
  
  <p>But how do I take into context start date and end date, while still trying to keep it basely sorted by creation date?</p>