title: Java Years between 2 Instants
body: <p>In Joda, we can calculate years between 2 Datetime using</p>
  
  <pre><code>Years.between(dateTime1, dateTime2);
  </code></pre>
  
  <p>Is there any easy way to find years between 2 instants using the <code>java.time</code> API instead without much logic?</p>
  
  <pre><code>ChronoUnit.YEARS.between(instant1, instant2)
  </code></pre>
  
  <p>fails:</p>
  
  <pre><code>Exception in thread "main" java.time.temporal.UnsupportedTemporalTypeException: Unsupported unit: Years
          at java.time.Instant.until(Instant.java:1157)
          at java.time.temporal.ChronoUnit.between(ChronoUnit.java:272)
          ...
  </code></pre>