Re: date format
Re: date format
- Subject: Re: date format
- From: has <email@hidden>
- Date: Wed, 28 Nov 2001 15:27:35 +0000
ehsan saffari wrote:
>
Dang! I just found one flaw with the French Vanilla,
>
it chokes on dates before Jan 1, 1904.
>
>
set x to 1 + ((currentDate - b + 1314864) div 2629728)
>
--> The result of a numeric operation was too large.
Ouch.
Thanks for the heads-up - I hadn't spotted this problem. Back to the
loop-based approach for me then.
Anyways... my funky date formatting library, strftimeLib, will (finally!)
be out by end of the month. Like the Date Format and Akua Sweets osaxen it
uses unix-type %... specifiers, but is more portable and more complete.
Also, as a result of this thread I'm adding an option for suppressing
leading zeroes (something the real strftime function can't do). Look for it
on AppleMods in a few days' time.
has
======================================================================
on getMonth(theDate)
repeat with m from 1 to 12
if item m of {January, February, March, April, May, June, July,
[NO-BREAK]August, September, October, November, December} is
[NO-BREAK]theDate's month then exit repeat
end repeat
m
end getMonth
======================================================================
[formatted using ScriptToEmail - gentle relief for mailing list pains]
[
http://files.macscripter.net/ScriptBuilders/ScriptTools/ScriptToEmail.hqx]