Details
-
Bug
-
Resolution: Won't Fix
-
Major - P3
-
None
-
None
-
None
-
ALL
Description
Seems to be related to a parsing issue.
c = db.c;
|
c.drop();
|
|
|
c.save( {} );
|
// Seems to work, using syntax similar to that in testall.js.
|
printjson( c.aggregate( { $project : { date: { $isoDate:[{ year:1 }] } } } ) );
|
// Seems to not work because the year value is not 1 or 0.
|
printjson( c.aggregate( { $project : { date: { $isoDate:[{ year:2 }] } } } ) );
|
// Seems to not work using syntax from documentation page.
|
printjson( c.aggregate( { $project : { date: { $isoDate:{ '$year':2 } } } } ) );
|
printjson( c.aggregate( { $project : { date: { $isoDate:[{ '$year':2 }] } } } ) );
|
Observed behavior: assertions when trying to create a date with { $isoDate:[
{ year:1 }] }.
Expected behavior: a valid date is created.
Attachments
Issue Links
- is duplicated by
-
SERVER-5762 conversions to dates don't accept constant arguments
-
- Closed
-