implementing unix strftime as an AS library - seeking advice
implementing unix strftime as an AS library - seeking advice
- Subject: implementing unix strftime as an AS library - seeking advice
- From: has <email@hidden>
- Date: Fri, 2 Nov 2001 18:51:44 +0000
Hi,
I'm putting together a script library that can be used to format dates
according to a formatting string, a-la the unix strftime call. Similar idea
to the Date Format OSAX, but more complete (and more portable).
e.g.
formatDate(current date, "%l:%M%P, %D")
--> " 7:40pm, 11/02/01"
formatDate(current date, "%T (%z)") --(Date & Time's time zone set for
Paris)
--> "19:43:16 (+0100)"
I've gotten a good chunk of the conversion specifiers done and working fine
as far as I can tell, but I could really do with feedback from someone
who's familiar with the real McCoy on whether I've actually done them all
correctly or not. Some advice on how the other specifiers should work would
also be real helpful - I'm not too hot on reading unix documentation and
some of it I'm lost on the meaning of.
I won't post the script here cos it's a bit long, but I'll be happy to mail
it to anyone who asks (30K stuffed). I want to post the thing to AppleMods
pretty shortly, so it'd be nice to get any rough bits hammered out before
then.
Any victim... ahh, I mean Wise And Kindly Souls willing to offer advice can
mail me direct if they'd prefer to help us out offlist (as the inner
workings of strftime may not be the most interesting subject for open
discussion on an AS list:).
Thanks in advance,
has