Re: Date Formatting
Re: Date Formatting
- Subject: Re: Date Formatting
- From: Andrew Oliver <email@hidden>
- Date: Fri, 07 Mar 2003 06:27:00 -0800
On 3/7/03 5:45 AM, "email@hidden" <email@hidden> wrote:
>
I've noticed that many of the recent date formatting posts concentrate on
>
OS X and the unix date command. This is easy but not much help to OS 9 users.
>
What about this old AS guidebook function? It may not be as short, but its
>
reasonably clear, it works in 9, and has kept right on working for me in X
>
without adjustment. It also handily and flexibly addresses the leading zeros
>
problem, and the US vs. World notation problem. Is there a reason that its
>
been considered unsuitable?
>
[snip]
I don't think this code is considered 'unsuitable' as much as unnecessary.
Consider 2K of script in 43 lines vs. a few bytes of script in one line.
Most script editors under 9 have issues with large scripts, imposing a 30K
limit on scripts. This code takes up 6% of that limit before you do anything
else - including calling the routine itself.
That's not to mention the fact that the unix date command is significantly
faster than the pure AppleScript method.
Part of the ethos of UNIX is that there's multiple little tools linked
together to create a greater whole. Using the unix date command simply
encompasses that idea.
Whether you like it or not, 9 is on its way out. If the author knows their
script will only be used under certain dependencies (e.g. under Mac OS X) or
is prepared to require that, then s/he'd be silly not to do so.
Conceptually, requiring Mac OS X and the presence of the 'date' command is
no different from running under Mac OS 9.x and requiring a particular
scripting addition to be installed.
If we never used new tools when they become available we'd still be driving
cars with 2-speed, belt-driven transmissions, like the Model T Ford had.
Andrew
:)
_______________________________________________
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.