Re: Do shell script "date" vs current date
Re: Do shell script "date" vs current date
- Subject: Re: Do shell script "date" vs current date
- From: has <email@hidden>
- Date: Mon, 11 Mar 2002 22:49:51 +0000
John W Baxter wrote:
>
At 8:38 -0700 3/11/2002, garbanzito wrote:
>
>however even just the shell's date command has some options
>
>that might be hard to reproduce with current date.
>
>
For instance,
>
do shell script "date +%Y-%m-%d"
>
--> "2002-03-11"
Hey, did someone just say "%Y-%m-%d"??? My Tune!!! ;)
I'll be posting a new copy of *strftimeLib* to AppleMods in a day or so (AM
lost all my mods when it moved hosts, and I've been extremely lazy in not
posting replacement copies). It implements a very large chunk of the unix
strftime call [1] in vanilla/Standard Additions AS. Plus you can use in any
of MacOS8/9/X; a quick "load script" and you're away.
Speed is also good, e.g. it's a hair slower than Akua Sweet's "the clock"
OMM. I don't know how it compares to the terminal approach because I don't
have OS X (though if anyone wants to compare the two I'd like to know the
result).
Incidentally, my very-beta-and-likely-to-change-before-release dateLib is
currently residing at my also-very-beta website
<
http://www.barple.connectfree.co.uk/>. It uses a "yyyy-mm-dd" format
string and has a bunch of nifty features (and is also quite nippy). Anyone
wants to play around with that, please do (I'd certainly appreciate the
feedback).
Cheers,
has
[1] It has a few [minor] variations to Darwin's own version; however, no
two strftime calls are ever entirely the same anyway (I think this is
considered part of the Unix Way;), so I don't really consider it an issue.
_______________________________________________
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.