Question: how to calculate years and months between two dates in javascript?
Answer: First we need to find number of years between two dates.
Multiply number of years between two dates by 12(because for each year 12 months)
Subtract the month number(June → 5) of second date with the month number of first date.