I want to calculate the diff between two dates (for example '11 oct 2015' and '23 dec 2015') in multiple units in Swift. For these dates the result i want to achieve should be something like '2 months, 11 days'
In java using joda-time library i can make it with the following code:
PeriodType pt = PeriodType.standard()
.withYearsRemoved()
.withWeeksRemoved()
.withHoursRemoved()
.withMinutesRemoved()
.withSecondsRemoved()
.withMillisRemoved();
Period per = new Period(date1, date2, pt);
int months = per.getMonths()
int days = per.getDays()
How can i get the same result in Swift?