Answers for "get difference between two dates in minutes swift"

1

get hours difference between two dates swift

let cal = Calendar.current
let components = cal.dateComponents([.hour], from: date2, to: date1)
let diff = components.hour!
Posted by: Guest on April-22-2020
0

swift date difference in days

let diffInDays = Calendar.current.dateComponents([.day], from: dateA, to: dateB).day
Posted by: Guest on May-03-2020

Code answers related to "get difference between two dates in minutes swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language