[DOCS-3156] Document behavior of passing a date to aggregation framework Created: 14/Apr/14  Updated: 30/May/14  Resolved: 30/May/14

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: v1.3.6

Type: Improvement Priority: Major - P3
Reporter: Kyle Erf Assignee: Tim Slavin
Resolution: Done Votes: 0
Labels: aggregation, datetime
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 9 years, 37 weeks, 5 days ago

 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?



 Comments   
Comment by Githook User [ 30/May/14 ]

Author:

{u'username': u'TimSlavinMongoDB', u'name': u'Tim Slavin (MongoDB)', u'email': u'tim.slavin@10gen.com'}

Message: DOCS-3156: clarified date subtraction output

Signed-off-by: kay <kay.kim@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/86c439c51800db1f94923a5013092d386861c4c5

Generated at Thu Feb 08 07:45:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.