Re: Comparing dates
Re: Comparing dates
- Subject: Re: Comparing dates
- From: "Alastair J.Houghton" <email@hidden>
- Date: Fri, 26 Sep 2003 15:12:25 +0100
On Friday, September 26, 2003, at 02:20 pm, Jeff LaMarche wrote:
On Thursday, September 25, 2003, at 08:57 PM, April Gendill wrote:
How do I compare two different dates?
lets say, I have scheduled an even for September 30 2003, and I want
to know if it is that date yet.. How do I do that I can't seem to get
my head wrapped around the NSDate and NSCalanderDate clases
I hate to ask if you've RTFM, but it's actually very straight
forward....
You do have to be a bit careful though; the methods you listed aren't
much use if you want to know whether it is e.g. September 30 2003,
because NSDate and NSCalendarDate take account of the *time* as well as
the date. That's why my response used -timeIntervalSinceNow, rather
than any of the comparison functions.
So yes, it *is* right there in the documentation, but I can see how
someone could become confused about how to compare two dates.
Kind regards,
Alastair.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.