• 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: class reference "date" problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: class reference "date" problems


  • Subject: Re: class reference "date" problems
  • From: Christopher Stone <email@hidden>
  • Date: Tue, 21 Apr 2015 20:57:51 -0500

On Apr 21, 2015, at 17:22, Jean-Christophe Helary <email@hidden> wrote:
I can see that, and I was expecting the reference to tell me *how* system values would affect it :)
______________________________________________________________________

Hey Jean-Christophe,

Well.  We're dealing with Apple and AppleScript.  :)

While Apple has devoted more resources to AppleScript over the last couple of releases of OSX there have been a lot of gaps for a long time.

That's why you need to buy a book or two if you're at all serious about AppleScript - and belong to the Applescript Users List and MacScripter.net.

Here it compiles to:
date "Thursday, May 4, 1961 at 11:30:00"

(notice the lack of GMT reference, even though I seem to have it in System preference...)

I believe it pulls only from the Full-Date and the Medium-Time, but you'd have to check to be sure.

But ask if you have specific needs.

I'd like to know how to find what string my system wants to compile to

date "Thursday, May 4, 1961 at 11:30:00"

set d to current date
set dStr to (date string of d) & space & time string of d

set dStr1 to "Tuesday, April 21, 2015"
set dt1 to date dStr1

set dStr2 to "Tue, April 21, 2015"
set dt2 to date dStr2

set dStr3 to "April 21, 2015"
set dt3 to date dStr3

set dStr4 to "4/21/2015"
set dt4 to date dStr4

set dStr5 to "4/21/2015 11:30"
set dt5 to date dStr5

set dStr6 to "4/21/2015 at 11:30"
set dt6 to date dStr5

set dStr7 to "11:30 4/21/2015"
set dt7 to date dStr6

All of these work on my system.

Then why hasn't the reference been updated ? *Or* is there a way to find how my system impacts on what is valid and what is not ?

Because.

If you don't like the answer talk to Apple and file a bug.

😎

Get used to the fact that with AppleScript you need a good reference, mentoring, and the willingness to tinker.

As a relative newbie don't feel bad if AppleScript makes you want to pull your hair out sometimes.  It's happened to most of us.

--
Best Regards,
Chris

 _______________________________________________
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: class reference "date" problems
      • From: Jean-Christophe Helary <email@hidden>
References: 
 >class reference "date" problems (From: Jean-Christophe Helary <email@hidden>)
 >Re: class reference "date" problems (From: Christopher Stone <email@hidden>)
 >Re: class reference "date" problems (From: Jean-Christophe Helary <email@hidden>)

  • Prev by Date: "Expected class name but found application constant or consideration"...
  • Next by Date: Re: class reference "date" problems
  • Previous by thread: Re: class reference "date" problems
  • Next by thread: Re: class reference "date" problems
  • Index(es):
    • Date
    • Thread