• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
implementing unix strftime as an AS library - seeking advice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Search Archives! Help Full
  • Next by Date: Re: OSX Applescript and remote applications?
  • Previous by thread: Re: Why o why won't my script/app open? - solved (it's sneaky)
  • Next by thread: Re: Passing variable from AppleScript to Terminal
  • Index(es):
    • Date
    • Thread