I have a date1 and the current Date when the view did load. Now I want to display how many days have passed since the day.
let timeInterval = date1.timeIntervalSince(date2)
Now I want to convert the timeInterval in days. Anyone could help?
I have a date1 and the current Date when the view did load. Now I want to display how many days have passed since the day.
let timeInterval = date1.timeIntervalSince(date2)
Now I want to convert the timeInterval in days. Anyone could help?
Copyright © 2021 Jogjafile Inc.
Rather than using TimeInterval you can get the number of days directly by using the Calendar class and DateComponents