Skip to content
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
14 changes: 9 additions & 5 deletions source/includes/fact-iso-date-objects.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
.. versionchanged:: 3.6

The argument must be a valid :ref:`expression
<aggregation-expressions>` that resolves to one of the following:

- A :ref:`Date <document-bson-type-date>` or
:ref:`Timestamp <document-bson-type-timestamp>`.
- A :ref:`Date <document-bson-type-date>`, a
:ref:`Timestamp <document-bson-type-timestamp>`,
or an :ref:`ObjectID <document-bson-object-id>`.

- A document of the following form:

Expand All @@ -24,9 +27,10 @@ The argument must be a valid :ref:`expression

- The date to which the operator is applied.
``<dateExpression>`` must be a valid :ref:`expression
<aggregation-expressions>` that resolves to either a
:ref:`Date <document-bson-type-date>` or a
:ref:`Timestamp <document-bson-type-timestamp>`.
<aggregation-expressions>` that resolves to a
:ref:`Date <document-bson-type-date>`, a
:ref:`Timestamp <document-bson-type-timestamp>`,
or an :ref:`ObjectID <document-bson-object-id>`.

* - ``timezone``

Expand Down
14 changes: 9 additions & 5 deletions source/reference/operator/aggregation/dateToParts.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Definition

{
$dateToParts: {
'date' : <isoDateExpression>,
'date' : <dateExpression>,
'timezone' : <timezone>,
'iso8601' : <boolean>
}
Expand All @@ -53,10 +53,14 @@ Definition

* - ``date``
- Required
- The input date for which to return parts.
``<isoDateExpression>`` can be any
:ref:`expression <aggregation-expressions>` that evaluates to
a BSON Date, Timestamp or ObjectID value. For more
- .. versionchanged:: 3.6

The input date for which to return parts.
``<dateExpression>`` can be any
:ref:`expression <aggregation-expressions>` that resolves to a
:ref:`Date <document-bson-type-date>`, a
:ref:`Timestamp <document-bson-type-timestamp>`, or an
:ref:`ObjectID <document-bson-object-id>`. For more
information on expressions, see
:ref:`aggregation-expressions`.

Expand Down
9 changes: 6 additions & 3 deletions source/reference/operator/aggregation/dateToString.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ Definition

* - ``date``

- The date to convert to string. ``<dateExpression>`` must be a
- .. versionchanged:: 3.6

The date to convert to string. ``<dateExpression>`` must be a
valid :ref:`expression <aggregation-expressions>` that
resolves to either a :ref:`Date <document-bson-type-date>` or
a :ref:`Timestamp <document-bson-type-timestamp>`.
resolves to a :ref:`Date <document-bson-type-date>`, a
:ref:`Timestamp <document-bson-type-timestamp>`, or an
:ref:`ObjectID <document-bson-object-id>`.

* - ``timezone``

Expand Down