Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-3156

Document behavior of passing a date to aggregation framework

    XMLWordPrintableJSON

Details

    Description

      The aggregation operators page says "Arithmetic operators support only numbers." But when using $subtract on two ISODates, it seemingly returns the number of milliseconds between them, which is decent, usable behavior. The page for $subtract doesn't note this either. http://docs.mongodb.org/manual/reference/operator/aggregation/subtract/#exp._S_subtract

      This behavior should be documented on the pages of the arithmetic operators, unless there's a reason we don't want to consider this a feature?

      Attachments

        Activity

          People

            tim.slavin Tim Slavin
            kyle.erf Kyle Erf
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9 years, 37 weeks, 5 days ago