Re: Create a folder with today's date as the folder name
Re: Create a folder with today's date as the folder name
- Subject: Re: Create a folder with today's date as the folder name
- From: Arthur J Knapp <email@hidden>
- Date: Mon, 11 Feb 2002 09:11:51 -0500
>
Date: Sun, 10 Feb 2002 13:18:34 +0000
>
From: has <email@hidden>
>
Subject: Re: Create a folder with today's date as the folder name
>
Out of interest... I was poking around looking for the fastest way of
>
getting a month as integer (French Vanilla [above], iterating across a list
>
of months looking for a match, etc) and found the following to be quickest
>
overall:
>
on monthToInteger(theMonth)
>
if theMonth is January then return 1
>
if theMonth is February then return 2
>
if theMonth is March then return 3
>
Not beautiful, but it's faster than the FV method on the first 10 months
>
(and much faster than the list iteration method).
This is also not beautiful, but there are a few milliseconds to be
saved by using "if, else if" rather than a series of "if"s.
on monthToInteger02(theMonth)
if theMonth is January then
return 1
else if theMonth is February then
return 2
else if theMonth is March then
return 3
...
{ Arthur J. Knapp, of <
http://www.STELLARViSIONs.com>
<
mailto:email@hidden>
try
<
http://www.seanet.com/~jonpugh/>
on error number -128
end try
}
_______________________________________________
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.