title: Between Dates using Waterline ORM SailsJS
body: <p><strong>Goal: Return a list of items that were created between two dates.</strong></p>
  
  <p>According to this issue <a href="https://github.com/balderdashy/waterline/issues/110" rel="noreferrer">https://github.com/balderdashy/waterline/issues/110</a> there is no <code>between</code> function just yet. However the work around is the following:</p>
  
  <pre><code>User.find({
      date: { '&gt;': new Date('2/4/2014'), '&lt;': new Date('2/7/2014') }
  }).exec(/* ... */);
  </code></pre>
  
  <p>To be more exact, we don't want the hard coded dates above so we read in the input from a form submission like so:</p>
  
  <pre><code>    start = new Date(req.param('yearStart') + '/' + req.param('monthStart') + '/' + req.param('dayStart'));
      end = new Date(req.param('yearEnd') + '/' + req.param('monthEnd') + '/' + req.param('dayEnd'));
  </code></pre>
  
  <p>Printing <code>start</code> and <code>end</code> to console shows me this (different timezones for some reason)?</p>
  
  <pre><code>from: Sat Mar 01 2014 00:00:00 GMT-0500 (EST)
  to: Sat Apr 30 2016 00:00:00 GMT-0400 (EDT)
  </code></pre>
  
  <p>However my view returns nothing every time.</p>