I have two dates in Date format.I have used the following code to find the difference between two dates.
extension Date { /// Returns the amount of years