neo4j / neo4j-javascript-driver

Neo4j Bolt driver for JavaScript
https://neo4j.com/docs/javascript-manual/current/
Apache License 2.0
847 stars 148 forks source link

`Time` and `LocalTime` types lack method `.toStandardDate()` #1075

Open stefano-ottolenghi opened 1 year ago

stefano-ottolenghi commented 1 year ago

The neo4j.Time and neo4j.LocalTime date types seem to lack the method .toStandardDate(). Other types have it, including neo4j.DateTime which supports nanoseconds.

bigmontz commented 1 year ago

neo4j.Time and neo4j.LocalTime doesn't have information about the day. So, it's not possible to create global.Date from it.

One alternative is to use current date as the date or enable use to define in which date they wan't the time.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date