swift开发笔记04
2017-09-08 16:03 dengchaojie_learner 阅读(101) 评论(0) 收藏 举报let now = Date()
let gregorian = Calendar.init(identifier: Calendar.Identifier.gregorian)
let components = (gregorian as NSCalendar).components(NSCalendar.Unit.year, from: birthdayDP.date, to: now, options: [])
let age = components.year
浙公网安备 33010602011771号