This example shows how to compare two dates using java, java 8 date time api and joda.
Straight up Java
Java 8 Date and Time API
LocalDate.isAfter checks if the date is after the provided date.
Joda Time
DateTime.isAfter returns true of the instance is after the instance provided comparing solely by millisecond.
Apache Commons
DateUtils.truncatedCompareTo will compare two calendars up to no more than the specified most significant field. In the case below, it will calculate up to the minute field.