You need to use NSCalendar to calculate the difference in terms of months and days. Example:
let calendar = NSCalendar.autoupdatingCurrentCalendar() calendar.timeZone = NSTimeZone.systemTimeZone() let dateFormatter = NSDateFormatter() dateFormatter.timeZone = calendar.timeZone dateFormatter.dateFormat = "yyyy-MM-dd" if let startDate = dateFormatter.dateFromString("2014-9-15") { let components = calendar.components([ .Month, .Day ], fromDate: startDate, toDate: NSDate(), options: []) let months = components.month let days = components.day print("It been \(months) months and \(days) days.") }
Output (2014-01-05):
It been 3 months and 21 days.
source share