I want to write a boolean valued function which returns true if the given LocalDateTime
falls between two specific points in time, false otherwise.
Specific
Hope this helps:
LocalDateTime localDateTime = LocalDateTime.now(DateTimeZone.UTC);
int dayNum = localDateTime.get(DateTimeFieldType.dayOfWeek());
boolean isWeekend = (dayNum == DateTimeConstants.SATURDAY || dayNum == DateTimeConstants.SUNDAY);
This is the simplest way for doing it without using many private constants.