title: MongoDB incorrect results with elemMatch and date fields
body: <p>I have the following document</p>
  
  <pre><code>{
      "_id" : ObjectId("52da43cd6f0a61e8a5059aaf"),
      "assignments" : [
          {
              "project" : "abc",
              "start" : ISODate("2012-12-31T18:30:00Z"),
              "end" : ISODate("2013-06-29T18:30:00Z")
          },
          {
              "project" : "efg",
              "start" : ISODate("2013-06-30T18:30:00Z"),
              "end" : ISODate("2014-03-30T18:30:00Z")
          }
      ],
      "eid" : "123",
      "name" : "n1",
      "uid" : "u1"
  }
  </code></pre>
  
  <p>i am trying to find all the assignments starting after a certain date with the following query. but the returned data is confusing and doesnt look correct. pl help me understand what am i doing wrong.</p>
  
  <pre><code>&gt; db.test.find( {uid:'u1'},{ assignments: { $elemMatch: {end: {$gte: new Date(2011,5,1) } } }} ).pretty();
  {
      "_id" : ObjectId("52da43cd6f0a61e8a5059aaf"),
      "assignments" : [
          {
              "project" : "abc",
              "start" : ISODate("2012-12-31T18:30:00Z"),
              "end" : ISODate("2013-06-29T18:30:00Z")
          }
      ]
  }
  </code></pre>
  
  <p>should it return both the projects?</p>