Re: list question
Re: list question
- Subject: Re: list question
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 03 Jun 2003 17:09:04 -0700
On 6/3/03 1:37 PM, "Chris Page" <email@hidden> wrote:
>
Lists and records are mutable. Numbers, strings, and most (all?) other
>
AppleScript objects are not -- you must copy string contents to a new
>
object if you wish to work with a substring, for example.
As I mentioned earlier, dates are also mutable, within the limits of "valid
date and time". (The weekday is smart enough to change along with whatever
else you're changing, but don't try changing the weekday on its own. It
seems to be ignored rather than erroring.)
set d to (current date)
--> date "Tuesday, June 3, 2003 5:04:40 PM"
set day of d to 9
d
--> date "Monday, June 9, 2003 5:04:40 PM"
set month of d to April
d
--> date "Wednesday, April 9, 2003 5:04:40 PM"
set year of d to 2002
d
--> date "Tuesday, April 9, 2002 5:04:40 PM"
set time of d to 14000
d
--> date "Tuesday, April 9, 2002 3:53:20 AM"
set weekday of d to Sunday
--> Sunday
d
--> date "Tuesday, April 9, 2002 3:53:20 AM"
weekday of d
--> Tuesday
--
Paul Berkowitz
_______________________________________________
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.