title: How to calculate number of decades between two dates
body: <p>There are easy ways to calculate number of days/months/years between two NSDate Objects. It can be done as follows for date( from apple documentation: <a href="https://developer.apple.com/library/ios/documentation/cocoa/Conceptual/DatesAndTimes/Articles/dtCalendricalCalculations.html" rel="nofollow">https://developer.apple.com/library/ios/documentation/cocoa/Conceptual/DatesAndTimes/Articles/dtCalendricalCalculations.html</a> )</p>
  
  <p>But I want to calculate number of decades between two NSDate objects. Any pointers?</p>
  
  <p>For example 1-Jan-1970 to 5-May-1987 has two decades, that is, 1970-1979 and 1980-1989.</p>