• 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: Michelle Steiner <email@hidden>
  • Date: Sun, 10 Feb 2002 18:43:34 -0700

On 2/10/02 6:18 AM, has <email@hidden> wrote:

>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:

Even for December? It has to evaluate 12 if-then statements to get to
December.

I found that this code works quite well, and quite fast:

set theMonth to text 1 through 3 of (month of (current date) as text)
set allTheMonths to "JanFebMarAprMayJunJulAugSepOctNovDec"
set monthInteger to ((offset of theMonth in allTheMonths) + 2) div 3

And it's about the shortest code to type for this evaluation. In fact,
it can be shortened to the following, if you like:

set allTheMonths to "JanFebMarAprMayJunJulAugSepOctNovDec"
set monthInteger to ((offset of (text 1 through 3 of (month of (current
date) as text)) in allTheMonths) + 2) div 3

(watch for mailer-induced line breaks in the above)

--Michelle



----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------
_______________________________________________
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.

  • Prev by Date: Outlook Express: deleting HTML
  • 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