Re: Getting the date of the next or current recurrence of an iCal/Calendar event
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