Provide custom constraints @Before and @After for time based types which cannot be mapped to an instant

Description

Amongst the new Java 8 date/time types are several types which are not mappable to a specific point on the timeline, e.g. MonthDate or Localtime. For these types @Past and @Future don't make sense. However, we could provide custom constraints to determine a before and after.

Thoughts?

Environment

None

Activity

Show:

Guillaume Smet January 26, 2017 at 4:11 PM

The decision we made is that they are now supported with @Future and @Past.

We can close this issue.

Guillaume Smet December 23, 2016 at 5:36 PM

so I currently implemented this one with @Past and @Future.

I'm wondering if the OP is right and maybe @Before and @After would be better.

WDYT?

Hendy Irawan August 30, 2016 at 5:13 PM

More specifically, LocalDate.now()

Hendy Irawan August 30, 2016 at 5:11 PM

Unless configured otherwise (is there any?), the current date of the system timezone.

Gunnar Morling August 30, 2016 at 1:13 PM

Hey , in your case, what would be defined as "now" when determining whether a LocalDate is in the past or future?

Duplicate

Details

Assignee

Reporter

Labels

Participants

Guillaume Smet
Gunnar Morling
Hardy Ferentschik
Hendy Irawan

Components

Priority

Created June 4, 2014 at 10:07 AM
Updated February 8, 2017 at 10:23 AM
Resolved February 8, 2017 at 10:23 AM