List of usage examples for java.time YearMonth until
@Override public long until(Temporal endExclusive, TemporalUnit unit)
From source file:Main.java
public static void main(String[] args) { YearMonth y = YearMonth.now(); long s = y.until(YearMonth.of(1990, Month.JANUARY), ChronoUnit.YEARS); System.out.println(s);//from ww w .ja v a2 s . c om }