NSDate compare is false?

Posted by user1280535 on Stack Overflow See other posts from Stack Overflow or by user1280535
Published on 2012-09-13T14:49:35Z Indexed on 2012/09/13 15:38 UTC
Read the original article Hit count: 149

Filed under:

i compare 2 NSDates which are the same and i get false result. i cant show how i get this dates because its too long , but i can show what i do :

NSLog(@"this date is:%@ , and date we check to equality is:%@",thisDate,dateToFind);
if([thisDate isEqualToDate:dateToFind]  )
{
    NSLog(@"equal date!"); // not printed! 
}

the NSLog show me this :

this date is:2012-09-13 14:23:54 +0000 , and date we check to equality is:2012-09-13 14:23:54 +0000

he doesnt print the NSLog . why ?

© Stack Overflow or respective owner

Related posts about objective-c