📜  swift 5 获取当前日期 - Swift 代码示例

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

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