On 20 Mar 2009, at 21:17, Charles E. Heizer wrote:

Thanks,
No it's just playing around right now. It would be nice to be able to specify if you wanted NSDate to be sub-second or second precision based.

Just as question, can NSDate be overridden to be second precision based?

Theoretically yes. Practically, it would be a rather bad idea. 1 second is meaningful to you, but consider a completely different culture's calendaring system where "a second" is actually equivalent to 3 of ours seconds. What would second precision be then?

The point is that you don't really want to test the equality of two dates. Instead you want to compare them like so:

date1 >= date2
date1 <= date2

Or you want to know if they're roughly equal to each other. "Is date1 within 0.5 seconds of date2"

_______________________________________________

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

Reply via email to