• 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: Calculate next occurrence of a NSDate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Calculate next occurrence of a NSDate
      • From: WT <email@hidden>
References: 
 >Calculate next occurrence of a NSDate (From: Tom Jones <email@hidden>)
 >Re: Calculate next occurrence of a NSDate (From: WT <email@hidden>)

  • Prev by Date: Getting a keystroke event to an NSTextView in another window.
  • Next by Date: Re: Calculate next occurrence of a NSDate
  • Previous by thread: Re: Calculate next occurrence of a NSDate
  • Next by thread: Re: Calculate next occurrence of a NSDate
  • Index(es):
    • Date
    • Thread