同じ 2 つの NSDates を比較すると、誤った結果が得られます。長すぎるため、この日付を取得する方法を示すことはできませんが、私が何をしているのかを示すことができます:
NSLog(@"this date is:%@ , and date we check to equality is:%@",thisDate,dateToFind);
if([thisDate isEqualToDate:dateToFind] )
{
NSLog(@"equal date!"); // not printed!
}
NSLog は私にこれを示します:
this date is:2012-09-13 14:23:54 +0000 , and date we check to equality is:2012-09-13 14:23:54 +0000
彼は NSLog を印刷しません。なぜ ?