Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>According to <a href="http://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSDate_Class/Reference/Reference.html#//apple_ref/occ/instm/NSDate/compare:" rel="noreferrer">Apple documentation of <code>NSDate compare:</code></a></p> <blockquote> <p>Returns an NSComparisonResult value that indicates the temporal ordering of the receiver and another given date.</p> <p><code>- (NSComparisonResult)compare:(NSDate *)anotherDate</code></p> <p><strong>Parameters</strong> <code>anotherDate</code></p> <p>The date with which to compare the receiver. This value must not be nil. If the value is nil, the behavior is undefined and may change in future versions of Mac OS X.</p> <p><strong>Return Value</strong></p> <p>If:</p> <p>The receiver and anotherDate are exactly equal to each other, <strong><code>NSOrderedSame</code></strong></p> <p>The receiver is later in time than anotherDate, <strong><code>NSOrderedDescending</code></strong></p> <p>The receiver is earlier in time than anotherDate, <strong><code>NSOrderedAscending</code></strong></p> </blockquote> <p>In other words:</p> <pre><code>if ([date1 compare:date2] == NSOrderedSame) ... </code></pre> <p>Note that it might be easier in your particular case to read and write this :</p> <pre><code>if ([date2 isEqualToDate:date2]) ... </code></pre> <p>See <a href="http://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSDate_Class/Reference/Reference.html#//apple_ref/occ/instm/NSDate/isEqualToDate:" rel="noreferrer">Apple Documentation about this one</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload