Calculates the years between two dates. The date must be equal or past for it to count as a full year.
yearsBetween(new Date('2007-08-01', '2008-07-31')); // 0yearsBetween(new Date('2007-08-01', '2008-08-01')); // 1 Copy
yearsBetween(new Date('2007-08-01', '2008-07-31')); // 0yearsBetween(new Date('2007-08-01', '2008-08-01')); // 1
Calculates the years between two dates. The date must be equal or past for it to count as a full year.