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

Re: AppleScript Date


  • Subject: Re: AppleScript Date
  • From: Jon Pugh via AppleScript-Users <email@hidden>
  • Date: Mon, 6 Jul 2020 11:56:58 -0700

On Jul 6, 2020, at 1:05 AM, Shane Stanley via AppleScript-Users
<email@hidden> wrote:
>
> On 6 Jul 2020, at 6:02 pm, john Mitchell via AppleScript-Users
> <email@hidden> wrote:
>>
>> What am I doing wrong?
>
> You need to pass a date, not a string.

It sounds flip, but it’s true.  ;)

>> startDate has the value “10 July 2020" and I get this message


Try something like this:

set startDate to date "July 10, 2020”

which should compile into a longer literal, depending on your local date
formatting settings:

set  startDate to date "Friday, July 10, 2020 at 12:00:00 AM”

You can then pass startDate to Calendar.

Jon

 _______________________________________________
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: AppleScript Date (From: john Mitchell via AppleScript-Users <email@hidden>)
 >Re: AppleScript Date (From: Shane Stanley via AppleScript-Users <email@hidden>)

  • Prev by Date: Re: Desktop setup script
  • Next by Date: Piyomaru display table Script Library Update
  • Previous by thread: Re: AppleScript Date
  • Next by thread: Piyomaru display table Script Library Update
  • Index(es):
    • Date
    • Thread