File tree Expand file tree Collapse file tree 3 files changed +24
-13
lines changed
reference/operator/aggregation Expand file tree Collapse file tree 3 files changed +24
-13
lines changed Original file line number Diff line number Diff line change
1
+ .. versionchanged :: 3.6
2
+
1
3
The argument must be a valid :ref: `expression
2
4
<aggregation-expressions>` that resolves to one of the following:
3
5
4
- - A :ref: `Date <document-bson-type-date >` or
5
- :ref: `Timestamp <document-bson-type-timestamp >`.
6
+ - A :ref: `Date <document-bson-type-date >`, a
7
+ :ref: `Timestamp <document-bson-type-timestamp >`,
8
+ or an :ref: `ObjectID <document-bson-object-id >`.
6
9
7
10
- A document of the following form:
8
11
@@ -24,9 +27,10 @@ The argument must be a valid :ref:`expression
24
27
25
28
- The date to which the operator is applied.
26
29
``<dateExpression> `` must be a valid :ref: `expression
27
- <aggregation-expressions>` that resolves to either a
28
- :ref: `Date <document-bson-type-date >` or a
29
- :ref: `Timestamp <document-bson-type-timestamp >`.
30
+ <aggregation-expressions>` that resolves to a
31
+ :ref: `Date <document-bson-type-date >`, a
32
+ :ref: `Timestamp <document-bson-type-timestamp >`,
33
+ or an :ref: `ObjectID <document-bson-object-id >`.
30
34
31
35
* - ``timezone ``
32
36
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ Definition
35
35
36
36
{
37
37
$dateToParts: {
38
- 'date' : <isoDateExpression >,
38
+ 'date' : <dateExpression >,
39
39
'timezone' : <timezone>,
40
40
'iso8601' : <boolean>
41
41
}
@@ -53,10 +53,14 @@ Definition
53
53
54
54
* - ``date``
55
55
- Required
56
- - The input date for which to return parts.
57
- ``<isoDateExpression>`` can be any
58
- :ref:`expression <aggregation-expressions>` that evaluates to
59
- a BSON Date, Timestamp or ObjectID value. For more
56
+ - .. versionchanged:: 3.6
57
+
58
+ The input date for which to return parts.
59
+ ``<dateExpression>`` can be any
60
+ :ref:`expression <aggregation-expressions>` that resolves to a
61
+ :ref:`Date <document-bson-type-date>`, a
62
+ :ref:`Timestamp <document-bson-type-timestamp>`, or an
63
+ :ref:`ObjectID <document-bson-object-id>`. For more
60
64
information on expressions, see
61
65
:ref:`aggregation-expressions`.
62
66
Original file line number Diff line number Diff line change @@ -48,10 +48,13 @@ Definition
48
48
49
49
* - ``date``
50
50
51
- - The date to convert to string. ``<dateExpression>`` must be a
51
+ - .. versionchanged:: 3.6
52
+
53
+ The date to convert to string. ``<dateExpression>`` must be a
52
54
valid :ref:`expression <aggregation-expressions>` that
53
- resolves to either a :ref:`Date <document-bson-type-date>` or
54
- a :ref:`Timestamp <document-bson-type-timestamp>`.
55
+ resolves to a :ref:`Date <document-bson-type-date>`, a
56
+ :ref:`Timestamp <document-bson-type-timestamp>`, or an
57
+ :ref:`ObjectID <document-bson-object-id>`.
55
58
56
59
* - ``timezone``
57
60
You can’t perform that action at this time.
0 commit comments