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

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -