AWS Security ChangesHomeSearch

AWS documentdb documentation change

Service: documentdb · 2026-03-28 · Documentation low

File: documentdb/latest/developerguide/dateAdd.md

Summary

Entire documentation page for the $dateAdd aggregation operator has been removed, including all examples, code snippets, and usage instructions.

Security assessment

The change removes an entire documentation page without any indication of security vulnerability, weakness, or incident. This appears to be a routine documentation cleanup or restructuring, possibly moving content to another location. There is no evidence in the diff of security fixes, vulnerability disclosures, or security-related content being added.

Diff

diff --git a/documentdb/latest/developerguide/dateAdd.md b/documentdb/latest/developerguide/dateAdd.md
index f5a67a152..8b1378917 100644
--- a//documentdb/latest/developerguide/dateAdd.md
+++ b//documentdb/latest/developerguide/dateAdd.md
@@ -1 +0,0 @@
-[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#dateAdd "Open PDF")
@@ -3,185 +1,0 @@
-[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html)
-
-Example (MongoDB Shell)Code examples
-
-# $dateAdd
-
-New from version 5.0
-
-The `$dateAdd` aggregation operator in Amazon DocumentDB allows you to add a duration to a date and time value.
-
-**Parameters**
-
-  * `date`: A date and time value to add a duration to.
-
-  * `duration`: The duration to add to the `date` value. This can be specified as an object with keys for `years`, `months`, `weeks`, `days`, `hours`, `minutes`, and `seconds`.
-
-  * `timezone`: (optional) The time zone to use when performing the date addition. If not specified, the default time zone of the Amazon DocumentDB cluster is used.
-
-
-
-
-## Example (MongoDB Shell)
-
-The following example demonstrates how to use the `$dateAdd` operator to add 2 days and 12 hours to a date.
-
-**Create sample documents**
-    
-    
-    db.events.insertMany([
-      { _id: 1, eventDate: ISODate("2023-04-01T10:00:00Z") },
-      { _id: 2, eventDate: ISODate("2023-04-02T12:00:00Z") },
-      { _id: 3, eventDate: ISODate("2023-04-03T14:00:00Z") }
-    ]);
-
-**Query example**
-    
-    
-    db.events.aggregate([
-      {
-        $project: {
-          _id: 1,
-          eventDate: 1,
-          eventDatePlustwodaysandtwelvehours: {
-            $dateAdd: {
-              startDate: {
-                $dateAdd: { 
-                  startDate: "$eventDate",
-                  unit: "day",
-                  amount: 2
-                }
-              },
-              unit: "hour",
-              amount: 12
-            }
-          }
-        }
-      }
-    ])
-
-**Output**
-    
-    
-    [
-      {
-        "_id": 1,
-        "eventDate": "2023-04-01T10:00:00Z",
-        "eventDatePlustwodaysandtwelvehours": ISODate("2023-04-03T22:00:00Z)"
-      },
-      {
-        "_id": 2,
-        "eventDate": "2023-04-02T12:00:00Z",
-        "eventDatePlustwodaysandtwelvehours": ISODate("2023-04-05T00:00:00Z)"
-      },
-      {
-        "_id": 3,
-        "eventDate": "2023-04-03T14:00:00Z",
-        "eventDatePlustwodaysandtwelvehours": ISODate("2023-04-06T02:00:00Z)"
-      }
-    ]
-
-## Code examples
-
-To view a code example for using the `$dateAdd` command, choose the tab for the language that you want to use:
-
-Node.js
-    
-    
-    
-    const { MongoClient } = require('mongodb');
-    
-    async function example() {
-      const client = await MongoClient.connect('mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false');
-      const db = client.db('test');
-      const collection = db.collection('events');
-    
-      const result = await collection.aggregate([
-        {
-          $project: {
-            _id: 1,
-            eventDate: 1,
-            eventDatePlustwodaysandtwelvehours: {
-              $dateAdd: {
-                startDate: {
-                  $dateAdd: {
-                    startDate: "$eventDate",
-                    unit: "day",
-                    amount: 2
-                  }
-                },
-                unit: "hour",
-                amount: 12
-              }
-            }
-          }
-        }
-      ]).toArray();
-    
-      console.log(result);
-    
-      await client.close();
-    }
-    
-    example();
-
-Python
-    
-    
-    
-    from pymongo import MongoClient
-    from bson.date_time import datetime
-    
-    def example():
-        client = MongoClient('mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false')
-        db = client['test']
-        collection = db['events']
-    
-        result = list(collection.aggregate([
-            {
-                '$project': {
-                    '_id': 1,
-                    'eventDate': 1,
-                    'eventDatePlustwodaysandtwelvehours': {
-                        '$dateAdd': {
-                            'startDate': {
-                                '$dateAdd' : {
-                                    'startDate': '$eventDate',
-                                    'unit': 'day',
-                                    'amount': 2,
-                                }
-                            },
-                            'unit': 'hour',
-                            'amount': 12,
-                        }
-                    }
-                }
-            }
-        ]))
-    
-        print(result)
-    
-        client.close()
-    
-    example()
-
-![Warning](https://d1ge0kk1l5kms0.cloudfront.net/images/G/01/webservices/console/warning.png) **Javascript is disabled or is unavailable in your browser.**
-
-To use the Amazon Web Services Documentation, Javascript must be enabled. Please refer to your browser's Help pages for instructions.
-
-[Document Conventions](/general/latest/gr/docconventions.html)
-
-$currentOp
-
-$dateDiff
-
-Did this page help you? - Yes
-
-Thanks for letting us know we're doing a good job!
-
-If you've got a moment, please tell us what we did right so we can do more of it.
-
-Did this page help you? - No
-
-Thanks for letting us know this page needs work. We're sorry we let you down.
-
-If you've got a moment, please tell us how we can make the documentation better.