Skip to content
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

Value range checks for temporal types #393

Merged
merged 4 commits into from
Jun 28, 2018

Conversation

lutovich
Copy link
Contributor

Added checks for all temporal types to assert that values used to create them are in expected numeric ranges. This should disallow negative months, days more than 31 and things like that.

Based on #390, only last commit is new.

This commit adds `#fromStandardDate()` functions to all temporal types
except `Duration`. Such functions allow to create temporal objects
from the provided standard JavaScript `Date`.
Standard dates have zero-based month. Neo4j temporal types have
1-based month. Conversion from standard date with zero month was not
handled correctly and resulted in zero month in neo4j temporal types.
Added checks for all temporal types to assert that values used to
create them are in expected numeric ranges. This should disallow
negative months, days more than 31 and things like that.
Copy link
Contributor

@ali-ince ali-ince left a comment

Choose a reason for hiding this comment

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

👍

@lutovich lutovich merged commit 3e54d8c into neo4j:1.6 Jun 28, 2018
@lutovich lutovich deleted the 1.6-check-temporal-ranges branch June 28, 2018 14:50
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