Re: NSDate in a Range
Re: NSDate in a Range
- Subject: Re: NSDate in a Range
- From: John Pannell <email@hidden>
- Date: Thu, 6 Jul 2006 17:20:48 -0600
Hi Malcom-
Assuming the existence of NSDate *dateA and NSDate *dateB (and NSDate
*myDateOfInterest), I would think the following would work.
if(([myDateOfInterest compare:dateA] == NSOrderedDescending) &&
([myDateOfInterest compare:dateB] == NSOrderedAscending)){
NSLog(@"my date is between A and B");
}
Double check with known dates to make sure... HTH!
John
On Jul 6, 2006, at 6:07 AM, malcom wrote:
How is possible to check if an NSDate is inside a range between date A
and date B?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40positivespinmedia.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden