📅  最后修改于: 2022-03-11 15:01:01.932000             🧑  作者: Mango
代码示例1
let cal = Calendar.current
let components = cal.dateComponents([.hour], from: date2, to: date1)
let diff = components.hour!