• 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: Another question about the date class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Another question about the date class (From: "emile.a.schwarz" <email@hidden>)

  • Prev by Date: Another question about the date class
  • Next by Date: Re: Saving to array list
  • Previous by thread: Another question about the date class
  • Next by thread: Re: Another question about the date class
  • Index(es):
    • Date
    • Thread