On Dec 30, 2010, at 8:03 PM, Tom Jones wrote:
> Hello,
> I'm trying to calculate next occurrence of a NSDate object. Based on a "Start 
> Date" ( e.g. 2010-12-10, Friday ) I would like to know the date of the next 
> Friday occurrence from today ( e.g. 2010-12-30, Thursday ).  
> 
> Example:
> StartDate = 2010-12-10
> CurrentDate = 2010-12-30
> Next Occurrence = 2010-12-31 <-Answer
> 
> I have not done this before so I'm not sure how to tackle this.

Read the docs on NSDateComponents and its companion guide "Date and Time 
Programming"; they should point you in the right direction.

-- 
Dave Carrigan
d...@rudedog.org
Seattle, WA, USA

_______________________________________________

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