-
Notifications
You must be signed in to change notification settings - Fork 335
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
LocalDate constructor validation not working #801
Comments
Eek, thank you. Very surprising! (Surprises me that we don't have tests, either. That must change...) Will fix for 2.0.1. |
Ah, found it. We validate that the day-of-month isn't too high - but not that it's not < 1! |
jskeet
added a commit
to jskeet/nodatime
that referenced
this issue
Apr 26, 2017
This was referenced Apr 26, 2017
Closed
jskeet
added a commit
that referenced
this issue
Apr 26, 2017
jskeet
added a commit
to jskeet/nodatime
that referenced
this issue
May 3, 2017
jskeet
added a commit
that referenced
this issue
May 4, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've noticed a bug in NodaTime 2.0
LocalDate
constructor - parameter validation doesn't seem to be working. It was working as expected in version 1.3.Example:
var date = new LocalDate(2001, 1, -1);
Expected result:
An
ArgumentOutOfRangeException
should be thrown as described in documentation:Actual result:
A
LocalDate
instance is created and can be used:An
ArgumentOutOfRangeException
is thrown fromToString()
method.The text was updated successfully, but these errors were encountered: