difference between two dates

Difference between two dates in Java using ChronoUnit

In this quick sneppet, you will explore java.time (Java 8) LocalDate, LocalDateTime, ZonedDateTime and ChronoUnit to find difference between two dates. ChronoUnit is the implementation class of java.time.TemporalUnit interface. The most commonly used units are defined in ChronoUnit e.g., WEEKS,… Read More!