• 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: Getting the date of the next or current recurrence of an iCal/Calendar event
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the date of the next or current recurrence of an iCal/Calendar event


  • Subject: Re: Getting the date of the next or current recurrence of an iCal/Calendar event
  • From: Shane Stanley <email@hidden>
  • Date: Wed, 30 Mar 2016 11:07:54 +1100

On 30 Mar 2016, at 6:32 AM, Nigel Garvey <email@hidden> wrote:
>
>    -- The original used NSDate's |date|() and NSCalendar()'s startOfDayForDate:, but this is faster and more legible.
>    tell (current date) to set startASDate to it - (its time)
>    tell current application's NSDate
>      set startNSDate to (its dateWithTimeInterval:0 sinceDate:startASDate)
>      set endNSDate to (its dateWithTimeInterval:0 sinceDate:(startASDate + (days - 1)))
>    end tell

The problem, though, is that this version still relies on bridging of AppleScript dates and NSDates, which was only introduced in 10.11. You can't pass an AppleScript date to an NSDate method in 10.9 or 10.10.

--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>


 _______________________________________________
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


References: 
 >Re: Getting the date of the next or current recurrence of an iCal/Calendar event (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: Libraries Using Libraries?
  • Next by Date: Daylight Saving bug in Numbers
  • Previous by thread: Re: Getting the date of the next or current recurrence of an iCal/Calendar event
  • Next by thread: Re: Getting the date of the next or current recurrence of an iCal/Calendar event
  • Index(es):
    • Date
    • Thread