Hi,
How can i calculate time difference in swift 2 between two dates/time and store in 2 different variables, one showing the full difference in terms of "Year, Month, Days, Hours, Minutes" & one variable for converting the total time difference in minutes.
For example-
First Date/time - 04/13/2016 8:11 AM
Current Date/Time - 04/22/2016 12:53 AM
Now one variable should display difference as "8 Day 16 hours & 43 Minutes", if there was a year & month difference, it should show that as well.
And second variable should simply convert "8 Day 16 hours & 43 Minutes" into minutes and should show only a integer for minutes.
Please note that first date can be a future date so it shouldn't display -tive time difference.
Please help.
Thanks
Akhil