• 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: calendar & repeating events api
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: calendar & repeating events api


  • Subject: Re: calendar & repeating events api
  • From: Roland King <email@hidden>
  • Date: Wed, 17 Feb 2016 10:41:42 +0800

> On 17 Feb 2016, at 10:34, Eric Gorr <email@hidden> wrote:
>
> When setting up a repeating event in Apple’s Calendar application, there is a lot of flexibility. For example, I can specify that an event repeats every month on the 5th Saturday. Of course, not every month has a fifth saturday, so for that month there is no event.
>
> What I am wondering is if there is direct api support for doing these date calculations…can I supply a set of parameters to a function and ask what the next 5th saturday of the month is?
>
> I can, of course, implement a naive algorithm which simply iterates through each day of the month, checks to see if it is the 5th Saturday encountered and return that date, but I am hoping I would not need to write something so tedious and prone to error. If there is a 3rd party library that would provide such support, I would be interested in learning about it as well.
>
> Thank you.

See NSCalendar - that does every type of date calculation you could think of and then some, and it’s all tested and maintained by someone else and knows all about every wrinkle in calendars known to man.
_______________________________________________

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


References: 
 >calendar & repeating events api (From: Eric Gorr <email@hidden>)

  • Prev by Date: Re: calendar & repeating events api
  • Next by Date: Re: calendar & repeating events api
  • Previous by thread: Re: calendar & repeating events api
  • Next by thread: Re: calendar & repeating events api
  • Index(es):
    • Date
    • Thread