Skip to content

DOCS-14133 new dateAdd, dateSubtract agg expressions #5179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions source/includes/extracts-agg-operators.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,10 @@ content: |
* - Name
- Description

* - :expression:`$dateAdd`

- Adds a number of time units to a date object.

* - :expression:`$dateDiff`

- Returns the difference between two dates.
Expand All @@ -392,6 +396,10 @@ content: |

- Converts a date/time string to a date object.

* - :expression:`$dateSubtract`

- Subtracts a number of time units from a date object.

* - :expression:`$dateToParts`

- Returns a document containing the constituent parts of a date.
Expand Down
2 changes: 1 addition & 1 deletion source/includes/fact-timezone-description-no-option.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The timezone of the operation result. ``<tzExpression>`` must be a
The timezone to carry out the operation. ``<tzExpression>`` must be a
valid :ref:`expression <aggregation-expressions>` that resolves to a
string formatted as either an `Olson Timezone Identifier
<https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>`_ or a
Expand Down
2 changes: 2 additions & 0 deletions source/reference/mongodb-extended-json.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ MongoDB Database Tools

.. include:: /includes/extracts/4.2-changes-extended-json-v2.rst

.. _bsontype-list-of-types:

BSON Data Types and Associated Representations
----------------------------------------------

Expand Down
11 changes: 10 additions & 1 deletion source/reference/operator/aggregation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ Alphabetical Listing of Expression Operators
- Returns the hyperbolic cosine of a value that is measured in
radians.

* - :expression:`$dateAdd`

- Adds a number of time units to a date object.

* - :expression:`$dateDiff`

- Returns the difference between two dates.
Expand All @@ -321,6 +325,9 @@ Alphabetical Listing of Expression Operators
- Constructs a BSON Date object given the date's constituent
parts.

* - :expression:`$dateSubtract`

- Subtracts a number of time units from a date object.

* - :expression:`$dateToParts`

Expand Down Expand Up @@ -1011,8 +1018,10 @@ Alphabetical Listing of Expression Operators
/reference/operator/aggregation/convert
/reference/operator/aggregation/cos
/reference/operator/aggregation/cosh
/reference/operator/aggregation/dateDiff
/reference/operator/aggregation/dateAdd
/reference/operator/aggregation/dateDiff
/reference/operator/aggregation/dateFromParts
/reference/operator/aggregation/dateSubtract
/reference/operator/aggregation/dateToParts
/reference/operator/aggregation/dateFromString
/reference/operator/aggregation/dateToString
Expand Down
Loading