AWS documentdb documentation change
Summary
Entire documentation page for the $isoWeekYear operator has been removed, including all content, examples, and code samples.
Security assessment
This change removes documentation for a specific MongoDB operator ($isoWeekYear) in Amazon DocumentDB. There is no evidence in the diff of security vulnerabilities, weaknesses, or incidents being addressed. The removal appears to be a routine documentation cleanup or restructuring, not related to security fixes. The code examples removed were standard usage examples without security implications.
Diff
diff --git a/documentdb/latest/developerguide/isoWeekYear.md b/documentdb/latest/developerguide/isoWeekYear.md index fc5f261e8..8b1378917 100644 --- a//documentdb/latest/developerguide/isoWeekYear.md +++ b//documentdb/latest/developerguide/isoWeekYear.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#isoWeekYear "Open PDF") @@ -3,119 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $isoWeekYear - -The `$isoWeekYear` operator in Amazon DocumentDB returns the ISO 8601 week year number for a given date. The ISO week year number differs from the Gregorian calendar year in that the week year can be different from the calendar year, especially at the start and end of the year. - -**Parameters** - - * `expression`: The date expression for which to return the ISO 8601 week year number. - - - - -## Example (MongoDB Shell) - -This example demonstrates how to use the `$isoWeekYear` operator to retrieve the ISO 8601 week year for the date field of each document in the events collection. - -**Create sample documents** - - - db.events.insertMany([ - { _id: 1, name: "Event 1", date: ISODate("2022-12-31T00:00:00Z") }, - { _id: 2, name: "Event 2", date: ISODate("2023-01-01T00:00:00Z") }, - { _id: 3, name: "Event 3", date: ISODate("2023-01-02T00:00:00Z") } - ]); - -**Query example** - - - db.events.aggregate([ - { $project: { - name: 1, - isoWeekYear: { $isoWeekYear: "$date" } - }} - ]); - -**Output** - - - [ - { "_id" : 1, "name" : "Event 1", "isoWeekYear" : 2023 }, - { "_id" : 2, "name" : "Event 2", "isoWeekYear" : 2023 }, - { "_id" : 3, "name" : "Event 3", "isoWeekYear" : 2023 } - ] - -## Code examples - -To view a code example for using the `$isoWeekYear` 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 events = db.collection('events'); - - const result = await events.aggregate([ - { $project: { - name: 1, - isoWeekYear: { $isoWeekYear: '$date' } - }} - ]).toArray(); - - console.log(result); - client.close(); - } - - example(); - -Python - - - - from pymongo import MongoClient - - 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 - events = db.events - - result = list(events.aggregate([ - { '$project': { - 'name': 1, - 'isoWeekYear': { '$isoWeekYear': '$date' } - }} - ])) - - print(result) - client.close() - - example() - - **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) - -$isoWeek - -$last - -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.