title: Mongo $subtract date doesn't work in aggregation $match block
body: <p>I am creating a mongo aggregation query which use a $subtract operator in my $match block. As explained in these codes below.</p>
  
  <p><strong>This query doesn't work:</strong></p>
  
  <pre><code>db.coll.aggregate(
  [
      {
          $match: {
              timestamp: {
                  $gte: {
                      $subtract: [new Date(), 24 * 60 * 60 * 1000]
                  }
              }
          }
      },
      {
          $group: {
              _id: {
                  timestamp: "$timestamp"
              },
              total: {
                  $sum: 1
              }
          }
      },
      {
          $project: {
              _id: 0,
              timestamp: "$_id.timestamp",
              total: "$total",
          }
      },
      {
          $sort: {
              timestamp: -1
          }
      }
  ]
  )
  </code></pre>
  
  <p><strong>However, this second query work:</strong></p>
  
  <pre><code>db.coll.aggregate(
  [
      {
          $match: {
              timestamp: {
                  $gte: new Date(new Date() - 24 * 60 * 60 * 1000)
              }
          }
      },
      {
          $group: {
              _id: {
                  timestamp: "$timestamp"
              },
              total: {
                  $sum: 1
              }
          }
      },
      {
          $project: {
              _id: 0,
              timestamp: "$_id.timestamp",
              total: "$total",
          }
      },
      {
          $sort: {
              timestamp: -1
          }
      }
  ]
  )
  </code></pre>
  
  <p>I need to use <code>$subtract</code> on my <code>$match</code> block so I can't use the last query.  </p>