On Fri, Mar 20, 2009 at 2:17 PM, Charles E. Heizer <[email protected]> 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?

You could add a category (say isEqualToDateUsingSecondResolution:) to
do that with code like the following...

if (fabs([someDate timeIntervalSinceDate:someOtherDate]) < 1.0) {
   // equal ignoring sub-second resolution
}

-Shawn
_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to