Re: Date anomaly
Re: Date anomaly
- Subject: Re: Date anomaly
- From: Nigel Smith <email@hidden>
- Date: Mon, 03 Mar 2003 12:35:26 +0000
On 2/3/03 10:33, "John Delacour" <email@hidden> wrote:
>
set d to "1/1/1"
>
date d
>
--> date "Monday, January 1, 2001 12:00:00 am"
>
>
try
>
(current date) - (date d)
>
on error e
>
e
>
end try
>
--> Can't make date "Monday, January 1, 2001 12:00:00 am" into a
>
number or date.
But:
(date d) - (current date)
will work. It is almost like there is some implicit coercion if the compiler
spots "current date" earlier in the line than "date d" and tries to make a
date into a date -- which begs the question why the coercion fails if you
subtract d...
Nigel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
References: | |
| >Date anomaly (From: John Delacour <email@hidden>) |