cocoa touch - How to compare two times in iOS -


i trying compare 2 times in ios. have list of times in array want check current time matching 1 array value. can how that. searched whole internet did't idea.

i saw this question answer can't exact result.

according apple documentation of nsdate compare:

returns nscomparisonresult value indicates temporal ordering of receiver , given date.  - (nscomparisonresult)compare:(nsdate *)anotherdate 

parameters anotherdate

the date compare receiver. value must not nil.

return value  if:  receiver , anotherdate equal each other, nsorderedsame  receiver later in time anotherdate, nsordereddescending  receiver earlier in time anotherdate, nsorderedascending  in other words:  if ([date1 compare:date2]==nsorderedsame) ... note might easier read , write :  if ([date2 isequaltodate:date2]) ... 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -