Skip to content

Commit e05170b

Browse files
mungitoperritojeff-allen-mongo
authored andcommitted
DOCS-14133 new dateAdd, dateSubtract agg expressions
1 parent c907a89 commit e05170b

File tree

7 files changed

+1053
-10
lines changed

7 files changed

+1053
-10
lines changed

source/includes/extracts-agg-operators.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,10 @@ content: |
379379
* - Name
380380
- Description
381381
382+
* - :expression:`$dateAdd`
383+
384+
- Adds a number of time units to a date object.
385+
382386
* - :expression:`$dateDiff`
383387
384388
- Returns the difference between two dates.
@@ -392,6 +396,10 @@ content: |
392396
393397
- Converts a date/time string to a date object.
394398
399+
* - :expression:`$dateSubtract`
400+
401+
- Subtracts a number of time units from a date object.
402+
395403
* - :expression:`$dateToParts`
396404
397405
- Returns a document containing the constituent parts of a date.

source/includes/fact-timezone-description-no-option.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The timezone of the operation result. ``<tzExpression>`` must be a
1+
The timezone to carry out the operation. ``<tzExpression>`` must be a
22
valid :ref:`expression <aggregation-expressions>` that resolves to a
33
string formatted as either an `Olson Timezone Identifier
44
<https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>`_ or a

source/reference/mongodb-extended-json.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ MongoDB Database Tools
7575

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

78+
.. _bsontype-list-of-types:
79+
7880
BSON Data Types and Associated Representations
7981
----------------------------------------------
8082

source/reference/operator/aggregation.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,10 @@ Alphabetical Listing of Expression Operators
312312
- Returns the hyperbolic cosine of a value that is measured in
313313
radians.
314314

315+
* - :expression:`$dateAdd`
316+
317+
- Adds a number of time units to a date object.
318+
315319
* - :expression:`$dateDiff`
316320

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

328+
* - :expression:`$dateSubtract`
329+
330+
- Subtracts a number of time units from a date object.
324331

325332
* - :expression:`$dateToParts`
326333

@@ -1011,8 +1018,10 @@ Alphabetical Listing of Expression Operators
10111018
/reference/operator/aggregation/convert
10121019
/reference/operator/aggregation/cos
10131020
/reference/operator/aggregation/cosh
1014-
/reference/operator/aggregation/dateDiff
1021+
/reference/operator/aggregation/dateAdd
1022+
/reference/operator/aggregation/dateDiff
10151023
/reference/operator/aggregation/dateFromParts
1024+
/reference/operator/aggregation/dateSubtract
10161025
/reference/operator/aggregation/dateToParts
10171026
/reference/operator/aggregation/dateFromString
10181027
/reference/operator/aggregation/dateToString

0 commit comments

Comments
 (0)