[COMPASS-4440] Date objects should stringify to an ISO date value consistent with mongosh Created: 07/Oct/20  Updated: 29/Oct/23  Resolved: 09/Nov/20

Status: Closed
Project: Compass
Component/s: Embedded Shell
Affects Version/s: None
Fix Version/s: 1.24.1

Type: Bug Priority: Major - P3
Reporter: Stennie Steneker (Inactive) Assignee: Anna Henningsen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Story Points: 3
Documentation Changes: Not Needed
Sprint: Iteration Papaya

 Description   

In Compass 1.22.1, Date and ISODate objects evaluate to {} in the embedded shell:

>  foo = new Date("2020-10-07")
< {}
 
> foo.toJSON()
< '2020-10-07T00:00:00.000Z'
 
> typeof foo
< 'object'

The expected result would be an ISO date similar to the toJSON() output. Example from standalone mongosh:

> foo = new Date("2020-10-07")
2020-10-07T00:00:00.000Z



 Comments   
Comment by Githook User [ 19/Nov/20 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(deps): update compass-shell to 0.5.2 COMPASS-4440 (#2053)

Fixes several formatting issues through
https://github.com/mongodb-js/mongosh/pull/395:

Comment by Githook User [ 16/Nov/20 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(deps): update compass-shell to 0.5.2 COMPASS-4440 (#2053)

Fixes several formatting issues through
https://github.com/mongodb-js/mongosh/pull/395:

Comment by Githook User [ 12/Nov/20 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(deps): update compass-shell to 0.5.2 COMPASS-4440 (#2053)

Fixes several formatting issues through
https://github.com/mongodb-js/mongosh/pull/395:

Comment by Githook User [ 12/Nov/20 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(deps): update compass-shell to 0.5.2 COMPASS-4440 (#2053)

Fixes several formatting issues through
https://github.com/mongodb-js/mongosh/pull/395:

Comment by Githook User [ 12/Nov/20 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(deps): update compass-shell to 0.5.2 COMPASS-4440 (#2053)

Fixes several formatting issues through
https://github.com/mongodb-js/mongosh/pull/395:

Comment by Githook User [ 11/Nov/20 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: fix(deps): update compass-shell to 0.5.2 COMPASS-4440

Fixes several formatting issues through
https://github.com/mongodb-js/mongosh/pull/395:

Generated at Wed Feb 07 22:36:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.