-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
This ticket is adapted from this comment - https://github.com/mongodb/js-bson/pull/490#issuecomment-1055492164
How are you using Mongo? What version of the server and driver are you using?
n/a
What is the feature/improvement you would like?
Temporal is a stage 3 ECMAScript proposal to add more robust support to work with dates and times in Javascript.
We should consider supporting serialization and deserialization of Temporal objects natively in the driver and BSON library.
We will need to consider what Temporal objects are properly serializable as BSON date objects and which are not. For Temporal objects which cannot be serialized as a BSON date, we can consider serializing them as strings outlined according to the docs on Temporal objects for persistence (background here).