Joda-time has an Interval class, which is a range between DateTimes. What can be used for a range of LocalDates?
I want an object that represents, for example \"from
I personnaly use the Range class from Guava.
It supports open ended ranges. It is also possible to specify included or excluded bounds. Among other numerous possibilities, those allow to easily represent "before a date" or "after a date".
Example for open-ended intervals.
Range before2010 = Range.atMost(new LocalDate("2009-12-31"));
Range alsoBefore2010 = Range.lessThan(new LocalDate("2010-01-01"));
It also offerts easy testing predicates, like contains and containsAll, and an intersection operation. All this tested and maintained.