• 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: Fun with dates...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fun with dates...


  • Subject: Re: Fun with dates...
  • From: Matt Neuburg <email@hidden>
  • Date: Thu, 23 Jun 2005 12:09:44 -0700

On Tue, 21 Jun 2005 20:56:30 -0400, Neil Faiman
<email@hidden> said:
>On Jun 19, 2005, at 9:18 PM, David Crowe wrote:
>
>> Paul;
>>
>> Thanks for explanation of why:
>>
>>     set ABSynchTime to "6/17/2005 23:56:45" as date
>>
>> fails, but:
>>
>>     set ABSynchTime to date "6/17/2005 23:56:45"
>>
>> succeeds (the coercion via 'as date' has never been implemented).
>>
>> It's this kind of thing that makes AppleScript programming so
>> difficult for a newbie. Without this group to answer questions like
>> this (especially when I don't have a workaround) I don't know what
>> I'd do!
>
>In this case, "date <string>" is a specific AppleScript language
>construct denoting the date which can be represented by the
>particular string. "<string> as date", on the other hand, is a just
>an instance of the AppleScript's general coercion syntax, and as Paul
>has pointed out, whether any particular coercion will or won't work
>is something of a coin-toss.

So on p. 268 of my book: "A string may be used to form a date specifier, but
it cannot be coerced to a date." I spent months testing this sort of thing
so you don't have to! (At least, I think I did; it was so painful that I've
now blocked it all out of my mind.) m.

--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: "read from" and non-lo-ascii characters
  • Next by Date: Re: Why is copying a file so hard?
  • Previous by thread: Re: Fun with dates...
  • Next by thread: Re: Fun with dates...
  • Index(es):
    • Date
    • Thread