-
Notifications
You must be signed in to change notification settings - Fork 62
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
Support constraints on date/time types #37
Comments
If the expected feature is validating if the given value is in a range, I would provide constraints on |
any comments would be appreciated |
I'm just curious, will it help to supersede Number-alike constraint implementations, like |
Good point. It could replace existing constraints. I need investigations. |
I just noticed that most classes in JSR-310 did not implement |
This is not true. But it is not as simple as expected since |
I think that adding validation to |
I am right now working on this feature. The current approach is to have the following: The base classes will implement common logic. It is basically has the same hierarchy as |
My understanding is that you need a extra field which your before and after
method would use to compare against.
How are you doind that?
…On Mon, 27 Dec 2021, 20:42 Diego Krupitza, ***@***.***> wrote:
Update: I introduced a second layer so comparable temporals do not have to
implement the same methods over and over again.
[image: TemporalConstraintsJAVI]
<https://user-images.githubusercontent.com/25965672/147505921-1b33007e-ed9e-4739-a26a-51c42dcfaa5d.png>
—
Reply to this email directly, view it on GitHub
<#37 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF67VG7VYIHTM2U2BUKI5KDUTDFUVANCNFSM4KGUJDVA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
It is now possible to add constraints on `java.time.LocalDate`, `java.time.LocalDateTime` and `java.time.ZonedDateTime`. Constraints that are currently available are `after(...)`, `before(...)`, `between(...)`, `leapYear(...)` and `zone(...)`. For further development the Temporal constraints are split into a hierarchy. The hierarchy is bound to the `java.time` hierarchy. Closes making#37
The |
Derived from #22 (comment)
The text was updated successfully, but these errors were encountered: