node ninja
node ninja

Reputation: 32986

Comparing time in NSDate

I am trying to compare the time from two NSDate objects but am getting the wrong answer. I think it is because when using the NSDate compare methods it is also including the date. I just want to ignore the date and compare the times. How can this be done?

Upvotes: 0

Views: 1008

Answers (1)

RolandasR
RolandasR

Reputation: 3047

well, you can always use NSCalendar's - (NSDate *)dateFromComponents:(NSDateComponents *)comps

Upvotes: 2

Related Questions