📜  快速获取当前时间 - Swift 代码示例

📅  最后修改于: 2022-03-11 15:00:57.699000             🧑  作者: Mango

代码示例1
let date = Date()
let calendar = Calendar.current
let hour = calendar.component(.hour, from: date)
let minutes = calendar.component(.minute, from: date)