title: Meteor Query Based On Date
body: <p>I search high and low but the only I can find is how to search based on a date range (e.g. from date A to date B) How can I find for specific date?</p>
  
  <p>I did this, but somehow it is not correct:</p>
  
  <pre><code>    var diff = parseInt(searchKey);
      var delta = diff * 24 * 60 * 60 * 1000;
  
      if(diff!=NaN){
        var targetDate = new Date(Date.now() + delta);              
        //alert(targetDate.toString()); 
        selector['date'] = targetDate;
        Session.set('selector', selector);
        Session.set('isFiltered',true);         
      }
  </code></pre>
  
  <p>The <code>targetDate</code> is a valid date, and the searchKey would be returned as remaining days (i.e 7 more days or -7 if the date has passed). The <code>selector</code> will be then passed as a parameter to <code>find()</code> for searching the collection.</p>
  
  <p>Too bad. It doesn't work as intended. Do I have to parse or format the javascript Date object before doing something like this as query selector  <code>{ date: '2014-04-01 00:00:00:00}</code>? Can't I simply pass the JS object and the framework is smart enough to compare it?</p>