How to calculate the number of years between 2 dates if the month is a 3 letter string
<p>I have 2 dates in the format below where the month is a 3 letter string</p>

<blockquote>
  <p>1988-Jul-21</p>
  
  <p>2016-Dec-18</p>
</blockquote>

<p>How do I calculate the number of years between the dates in the above format?</p>

<p>I was able to calculate the difference between the dates in years when the month is an integer using Joda time like below</p>

<pre><code>val y = Years.yearsBetween(new LocalDate("1988-12-21"), new LocalDate("2016-1-18"))
println( y.getYears)
Output: 27
</code></pre>