• 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: Create a folder with today's date as the folder name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Create a folder with today's date as the folder name
      • From: "Serge Belleudy-d'Espinose" <email@hidden>
  • Prev by Date: Re: shell script with top "can't get terminal attributes"?
  • Next by Date: Re: Create a folder with today's date as the folder name
  • Previous by thread: Re: Create a folder with today's date as the folder name
  • Next by thread: Re: Create a folder with today's date as the folder name
  • Index(es):
    • Date
    • Thread