let age = calcAge(birthday: "789089362000") // pass timeStamp in mili seconds
print("Age = \(age)")
func calcAge(birthday: String) -> Int {
let seconds = (Int(birthday)!/1000) as NSNumber?
let timeStampDate = Date(timeIntervalSince1970: seconds!.doubleValue)
let calendar: NSCalendar! = NSCalendar(calendarIdentifier: .gregorian)
let now = Date()
let calcAge = calendar.components(.year, from: timeStampDate, to: now, options: [])
let age = calcAge.year
return age!
}