I've returned a NSDate value back from my server and I need to know how long ago this NSDate was. I need to write a conditional to see if the date is older than 6 months (in Swift, but I can convert Objective-C).
Here is the NSDate returned, when printed in console:
(2015-09-07 01:22:01 +0000)
How do I check if this date above is older than 6 months?
The logic would be something like this:
//dateValue is the NSDate returned
var dateValue = log.createdAt
if (dateValue > 6 months){
}
else{
}