📌  相关文章
📜  快速获取两个日期之间的小时差代码示例

📅  最后修改于: 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!