• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSDate in a Range
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >NSDate in a Range (From: malcom <email@hidden>)

  • Prev by Date: Core Data document-based apps saves empty files
  • Next by Date: Core Data document-based apps saves empty files
  • Previous by thread: Re: NSDate in a Range
  • Next by thread: Re: NSDate in a Range
  • Index(es):
    • Date
    • Thread