Have a look at the demo at the link above, and download the code: strftime.js. It's distributed under a BSD license, so use it and give me feedback. Post comments here for now.The code is documented using doxygen style comments.
You should also check out Stoyan's time input library that lets you do the equivalent of php's strtotime function.
Update: This code is now part of the YUI library and all further development will be done there.