title: How to solve FeathersJS front date querying with NeDB
body: <p>On a front application using Feathers client, I'm trying to filter data by date:</p>
  
  <pre class="lang-js prettyprint-override"><code>rides = await client.service('rides').find({
    query: {
      date: {
        ...past ? { $lt: new Date().getTime() } : { $gte: new Date().getTime() },
      },
      $sort: {
        date: past ? 1 : -1,
      },
    },
  }).then(result =&gt; result.data);
  </code></pre>
  
  <p>This is not working, giving me zero result.</p>
  
  <p>I found on an <a href="https://github.com/feathersjs-ecosystem/feathers-reactive/issues/62#issuecomment-469950236" rel="nofollow noreferrer">official issue</a> this is because the query is passed as a string and NeDB needs a database.</p>
  
  <p>This hack on the feathers api hook confirms the issue:</p>
  
  <pre class="lang-js prettyprint-override"><code>// On find.before hook
  if (params.query &amp;&amp; params.query.date.$gte) {
    params.query.date.$gte = new Date(params.query.date.$gte);
  }
  if (params.query &amp;&amp; params.query.date.$lt) {
    params.query.date.$lt = new Date(params.query.date.$lt);
  }
  </code></pre>
  
  <p>But this is not a reliable solution to build reliable querying on any field.</p>
  
  <p>What is the best way to handle it?</p>