title: MongoDB find date range if overlap with other dates
body: <p>I have many documents with the schema shown below each containing (start date, enddate) as shown in the schema below. Is there a simple way to know before saving a new document if the new document startdate, enddate will overlap with previously saved documents startdate, enddate? Thanks</p>
  
  <pre><code>{
      "title" : "",
      "owner" : "",
      "notes" : "",
      "startdate" : "",
      "enddate" : ""
  }
  </code></pre>
  
  <p>Below is the only document currently saved:</p>
  
  <pre><code>Document.(anonymous function) {_id: "FADnPAxRu4Ps5hkLz", 
     title: "Round A", 
     customerid: "QDGvBQhS6vYgZtnRr", 
     startdate: "11/21/2014 7:25 AM"…}
  _id: "FADnPAxRu4Ps5hkLz"customerid: "QDGvBQhS6vYgZtnRr"
  enddate: "11/30/2014 6:09 AM"
  startdate: "11/21/2014 7:25 AM"
  title: "Round A"__proto__: Document.(anonymous function)
  </code></pre>
  
  <p>When I try executing any of the following query on the above document it return nothing, even though there is an obvious overlap here.</p>
  
  <pre><code>db.Projects.find({'startdate': {$lt: '11/25/2014 6:26 PM'}, 'enddate': {$gt: '11/19/2014 6:26 PM'}}, {sort:{time: -1}});
  
  db.Projects.find({'startdate': {$lt: '11/30/2014 6:26 PM'}, 'enddate': {$gt: '11/21/2014 6:26 PM'}}, {sort:{time: -1}});
  </code></pre>