Re: Another question about the date class
Re: Another question about the date class
- Subject: Re: Another question about the date class
- From: Axel Luttgens <email@hidden>
- Date: Thu, 01 Nov 2012 11:24:26 +0100
Le 1 nov. 2012 à 11:08, emile.a.schwarz a écrit :
> Hi all,
>
> The language reference says (nothing, it is dead nearly 5 years ago):
>
> AppleScript supports coercion of a date object to a single-item list or a text object.
>
> I suppose that I understand the part "a text object", but I do not understand how to get a date object as a list.
Hello Emile,
You'll note that the ASLG mentions the coercion to a single-item list for almost any class, not just dates.
Taken literally, this means that one may write:
(current date) as list
--> {date "jeudi 1 novembre 2012 11:21:44"}
More interestingly, this allows to write such things as well:
{1, "a"} & (current date)
--> {1, "a", date "jeudi 1 novembre 2012 11:23:06"}
HTH,
Axel
_______________________________________________
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