MACSCRPT Archives

September 2009

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stan Cleveland <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Tue, 22 Sep 2009 16:51:51 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (28 lines)
On 9/22/09 4:24 PM, "Bruce Robertson" wrote:

>> On Sep 22, 2009, at 6:45 PM, Shane Stanley wrote:
>> 
>> FWIW, the unit-conversion hack still works in Snow Leopard:
>> 
>> property zdate : date "Monday, August 10, 1992 11:00:00 AM"
>> set file_name to ((current date) - zdate as feet as text) & ".html"
> 
> How does that work??
> 
> By itself you get an error:
> 
> zdate as feet as text


Bruce, it would be more correct to adjust the parentheses thusly:
    set file_name to ((current date) - zdate) as feet as text & ".html"

With that change, perhaps it's easier to see that the "as feet as text" part
is being applied to an integer, not a date, since the result of subtracting
one date from another is their difference in seconds.

The hack somehow prevents scientific notation from being used, though I'm
clueless as to how.

Stan C.

ATOM RSS1 RSS2