Here you can find the source of isSameLocalDate(LocalDate first, LocalDate second)
static public boolean isSameLocalDate(LocalDate first, LocalDate second)
//package com.java2s; //License from project: Open Source License import java.time.*; public class Main { /**/*from ww w . j a v a 2 s.c om*/ * isSameLocalDate, This compares two date variables to see if their values are equal. Returns * true if the values are equal, otherwise returns false. * * More specifically: This returns true if both values are null (an empty date). Or, this * returns true if both of the supplied dates contain a date and represent the same date. * Otherwise this returns false. */ static public boolean isSameLocalDate(LocalDate first, LocalDate second) { // If both values are null, return true. if (first == null && second == null) { return true; } // At least one value contains a date. If the other value is null, then return false. if (first == null || second == null) { return false; } // Both values contain dates. Return true if the dates are equal, otherwise return false. return first.isEqual(second); } }