java.time · java.base · since Java 1.8
Period
public final class Period implements ChronoPeriod, SerializableA calendar-unit span (years, months, days): "3 months" regardless of their length. Duration measures exact time; Period measures human calendar distance.
Key methods
static Period between(LocalDate start, LocalDate end) | Calendar distance (y/m/d components). |
static Period ofMonths(int) / ofYears(int) | Creation. |