• 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: Reading Apple Calendar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading Apple Calendar


  • Subject: Re: Reading Apple Calendar
  • From: Stan Cleveland <email@hidden>
  • Date: Fri, 06 Sep 2013 16:28:23 -0700

On Sep 6, 2013, at 2:56 PM, Alex Hall wrote:

Incidentally, if anyone has a solution for the repeating events problem, I'd love to hear it. I suppose you could iterate over every event, scanning for repetition and manually extracting if the event will repeat within your targeted timeframe, but there has to be an easier way... Please tell me there's an easier way! :)

Hi Alex,

In AppleScript, the 'recurrence' property of an 'event' is either a string or 'missing value'. When a 'recurrence' is a string, then iCal calculates future occurrences of the event from rules specified within the string. For us scripters, attempting to correctly parse future repetitions from these rules would be difficult and fraught with obstacles. 

I believe that iCal generally follows the "iCalendar" standard defined by the IETF (Internet Engineering Task Force) as RFC 2445, titled "Internet Calendaring and Scheduling Core Object Specification". Using RFC 2445, for example, the string "FREQ=DAILY,BYMONTHDAY=13,BYDAY=FR" specifies every future instance of Friday the 13th. (There's one next week!) Via its UI, iCal would  disallow such a complex (and contradictory) rule. And I'm not sure whether such a rule, inserted into an event via AppleScript, would actually function in iCal.

FWIW, there's an open-source Java library for parsing recurring events that use the RFC 2445 standard. It is hosted here:
http://code.google.com/p/google-rfc-2445/
You might be able to make Java calls from AppleScript to utilize this library. 

There may be other resources out there of which I'm unaware. Maybe Cocoa has some functionality in this department. It's too bad that Apple, who has a solution working for iCal's UI, couldn't (or didn't) expose the same in iCal's AppleScript dictionary.

Regards,
Stan C.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Reading Apple Calendar
      • From: Alex Hall <email@hidden>
References: 
 >Reading Apple Calendar (From: Robert Cuilla <email@hidden>)
 >Re: Reading Apple Calendar (From: Christian Boyce <email@hidden>)
 >Re: Reading Apple Calendar (From: Alex Hall <email@hidden>)

  • Prev by Date: Re: Reading Apple Calendar
  • Next by Date: Re: Reading Apple Calendar
  • Previous by thread: Re: Reading Apple Calendar
  • Next by thread: Re: Reading Apple Calendar
  • Index(es):
    • Date
    • Thread