Re: making a new folder
Re: making a new folder
- Subject: Re: making a new folder
- From: Bill Briggs <email@hidden>
- Date: Fri, 2 Aug 2002 12:09:26 -0300
At 9:37 AM -0500 02/08/02, Michael Grant wrote:
On 8/1/02 5:29 PM, "Bill Briggs" <email@hidden> wrote:
set {d, m, y} to {day, month, year} of todaysDate
set monthList to {January, February, March, April, May, ,
June, July, August, September, October, November, ,
December}
repeat with i from 1 to 12
if m = (item i of monthList) then
I've had lots of trouble with the 'month' keyword, which seems to come out
'jul' when I'm expecting 'July' and vice versa.
I've not seen that.
(I read in one of the older books, Goodman I think but I'm too lazy
to look it up again now, that it's not actually a string and can't
be coerced to one--of course that may be obsolete information.)
That was true when the book was written. When you ran
get month of (current date)
you got the month, which is an object class of it's own (and it looks
like each month is an object class unto itself). But you couldn't
then coerce it to a string. As of about 2- 1/2 years ago - not sure
which release of AppleScript - you can coerce month to a string.
get month of (current date) as string
What does work consistently is looping through the
month list and testing if that month is in the date string.
I've never bothered to do it with strings. I've used the posted
approach in a number of scripts and it has never given any problems.
Not sure why you'd see July coming as jul.
- web
_______________________________________________
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.