objective c - Comparison of Date/Time with unknown format -



objective c - Comparison of Date/Time with unknown format -

i have time value in output

first :=

"updated_time" = 1308318422; (unix timestamp, returning "stream" table facebook)

second :=

"created_at" = "thu jul 14 15:24:51 +0000 2011"; ( time of twitter post, don't type of format is).

i have compare both date/time. have list recent come first , on.

what logic? code preference appreciate :) in advance

convert both values nsdate objects , utilize compare: method.

the first can converted getting int value of updated_time , using [nsdate datewithtimeintervalsince1970:updatedtimeint].

the sec can converted nsdateformatter object.

objective-c ios4

Comments

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -