Compare 2 NSDate


/ Published in: Objective C
Save to your folder(s)

Compare 2 NSDate


Copy this code and paste it in your HTML
  1. switch ([dateOne compare:dateTwo]) {
  2. case NSOrderedAscending:
  3. // dateOne < dateTwo
  4. break;
  5. case NSOrderedSame:
  6. // The dates are the same
  7. break;
  8. case NSOrderedDescending:
  9. // dateOne > dateTwo
  10. break;
  11. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.