Entry Number: Last Updated: Mar 15 1995 Document Revision: 0395A
Q: In EOF 1.0, why do two identical NSDates compare as NSOrderedAscending instead of NSOrderedSame?
Q: Why does an array of NSDates not sort properly when there are one second differences between some of the elements?
In EOF 1.0 and EOF 1.1, the isEqual: and compare: methods in NSDate were implemented to use a one second delta. In EOF 1.1, the behavior of these methods was improved, but remains incorrect for dates differing by less than one second.
The following category implements the correct behavior: