Skip to content

Add method for convert driver temporal types to Javascript Date #842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 14, 2022

Conversation

bigmontz
Copy link
Contributor

The conversion between date types in the javascript driver can be a bit convoluted and have to do conversions like new Date(driverDate.toString()) doesn't help.

This change introduces the method toStandardDate to Date, DateTime and LocalDateTime which could avoid the repeating conversion boilerplate in the developer code.

The conversion between date types in the javascript driver can be a bit convoluted and have to do conversions like `new Date(driverDate.toString())` doesn't help.

This change introduces the method `toStandardDate` to `Date`, `DateTime` and `LocalDateTime` which could avoid the repeating conversion boilerplate in the developer code.
Copy link

@AndyHeap-NeoTech AndyHeap-NeoTech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bigmontz bigmontz merged commit c45a6b9 into neo4j:5.0 Jan 14, 2022
@bigmontz bigmontz deleted the 5.0-driver-date-to-date branch January 14, 2022 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants