Re: Calculate next occurrence of a NSDate
Re: Calculate next occurrence of a NSDate
- Subject: Re: Calculate next occurrence of a NSDate
- From: Ken Thomases <email@hidden>
- Date: Fri, 31 Dec 2010 08:24:23 -0600
On Dec 31, 2010, at 7:22 AM, WT wrote:
> The following is straight out of my code, and computes the next Wed or Sat from a given date.
Computing days by calculating the number of seconds in a day will fail when crossing into or out of Daylight Saving Time.
Use -[NSCalendar dateByAddingComponents:toDate:options:] as shown in the documentation.
Regards,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden