NSDate number of days between two dates
Date objects in programming are typically both extremely common and notoriously tricky due to the many different syntaxes involved. These rules apply to iPhone development. In one application I created, I needed the number of days between 2 dates in several instances. As there is no simple NSDate2 - NSDate1 function built-in to return the number of days apart, I wrote a function to accomplish the task. Here it is...
Read more »
Read more »
Labels: NSCalendar, NSDate, NSDateComponents, NSDayCalendarUnit, NSGregorianCalendar, NSMonthCalendarUnit