On Fri, Mar 20, 2009 at 1:50 PM, Charles E. Heizer <heiz...@llnl.gov> wrote: > Hello, > I'm playing around with date time stuff right now and I'm trying to figure > out the bets way to determine if one datetime is equal to another. The > problem I'm running in to is "isEqualToDate" does not appear to work, the > NSLog statement will show two identical datetime statements but I never see > a "These dates are the same!".
What does it mean for one NSDate to be equal to another NSDate from the point of view of your requirements? Note what the docs on isEqualToDate: say... "This method detects sub-second differences between dates. If you want to compare dates with a less fine granularity, use timeIntervalSinceDate: to compare the two dates." ...or look at using -[NSDate laterDate:] -[NSDate earlierDate:]. I generally think in terms of using the later two methods unless I need to know a specific delta. -Shawn _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com