Hey all,
I just reviewed the proposal in more detail. I really like it. Great work. Some comments:
Make current time and timezone customizable
I also don't see a use case for making the retrieval more contextual. But if we design the TimeProvider this way, adding something to the method signature won't be possible in the future. However, I don't think this is a real problem. Unless someone comes up with some use case.
Other JSR 310 types to support
If we support the "Year" type, we should also support "YearMonth". This type is not so widely used, but it feels strange to not support it if we support "Year".
Another thing: If @Future and @Past support types like LocalDate, YearMonth and Year, should we perhaps enhance them to allow the user to specify that the "current" year/month/date should also be valid? I'm thinking of something like:
@Past( inclusive=true )
private LocalDate someDate; // valid if someDate <= today
Thoughts?
Christian