swift calendar get amount days between dates code example
Example: swift date difference in days
let diffInDays = Calendar.current.dateComponents([.day], from: dateA, to: dateB).day
let diffInDays = Calendar.current.dateComponents([.day], from: dateA, to: dateB).day