• 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: list question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: list question
      • From: Michelle Steiner <email@hidden>
References: 
 >Re: list question (From: Chris Page <email@hidden>)

  • Prev by Date: Re: list question (was: list question)
  • Next by Date: saving mail.app attachment
  • Previous by thread: Re: mailing-list meta-question (was: [applescript] list question)
  • Next by thread: Re: list question
  • Index(es):
    • Date
    • Thread