How can you determine the hour, minute and second from NSDate class in Swift 3?
In Swift 2:
let date = NSDate() let calendar = NSCalendar.currentCale
In Swift 3 you can do this,
let date = Date() let hour = Calendar.current.component(.hour, from: date)