Re: Quickie Question
Re: Quickie Question
- Subject: Re: Quickie Question
- From: Arthur J Knapp <email@hidden>
- Date: Sat, 30 Mar 2002 18:54:42 -0500
>
Date: Sat, 30 Mar 2002 18:36:11 +0100
>
From: Sander Tekelenburg <email@hidden>
>
Subject: Re: Quickie Question
>
- From the <news:alt.comp.lang.applescript> FAQ at
>
<http://homepage.mac.com/dlivesay/aclafaq.html>:
This is a very nice FAQ. It would be great to see it regularly
updated and added to for those most frequently asked questions.
>
3.3. How can I get the month of a date as a number?
>
you can use the so-called French Vanilla algorithm:
>
set theDate to the current date --or any other date
>
copy theDate to b
>
set the month of b to January
>
set monthNum to (1 + (theDate - b + 1314864) div 2629728)
>
Note the term "french vanilla". It seems likely it refers to Emmanuel ;)
With regard to Richard Hartman's improvment:
set monthNum to (1 + (theDate - b) div N)
where N can be: 2419200 <= N <= 2505600
Nigel Garvey suggested that a new name be given to it:
>
So what do we call this version? "Vanille Douce de Mer"?
Meaning something like, "Vanilla Soft of the Sea", a reference to
Richard's email address: "SeaSoft".
{ Arthur J. Knapp, of <
http://www.STELLARViSIONs.com>
<
mailto:email@hidden>
try
<
http://www3.sympatico.ca/victor.yee/>
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.