Java Utililty Methods LocalDate Compare

List of utility methods to do LocalDate Compare

Description

The list of methods to do LocalDate Compare are organized into topic(s).

Method

booleanisSameLocalDate(LocalDate first, LocalDate second)
isSameLocalDate, This compares two date variables to see if their values are equal.
if (first == null && second == null) {
    return true;
if (first == null || second == null) {
    return false;
return first.isEqual(second);
booleanisSameMonthAndDay(@Nonnull final LocalDate x, @Nonnull final LocalDate y)
is Same Month And Day
return x.getMonth() == y.getMonth() && x.getDayOfMonth() == y.getDayOfMonth();
booleanisSameYearAndWeek(@Nonnull final LocalDate x, @Nonnull final LocalDate y, @Nonnull final Locale aLocale)
is Same Year And Week
return x.getYear() == y.getYear()
        && getWeekOfWeekBasedYear(x, aLocale) == getWeekOfWeekBasedYear(y, aLocale);