They say that you cannot teach an old dog new tricks, so this dog has been up to some old tricks. A couple of days ago I released strftime[1] for javascript with partial support for all of PHP's strftime[2] format specifiers, and today I released version 1.2 with full support and the ability to localise it.
Get it via freshmeat here: http://freshmeat.net/projects/strftime-js/ (if you want the tarballs) or directly here: http://hacks.bluesmoon.info/strftime/ (if you only want the source and docs).
The code is BSD licensed.
Some more info: - The opengroup specification for strftime has 33 format specifiers and 19 modified format specifiers - PHP's strftime has the 33 basic format specifiers and adds 3 more - This javascript implementation supports the entire PHP set, and does not support the 19 modified format specifiers - The code supports locale specific representations through a locale extension mechanism which is well documented [3]
There are bound to be bugs, so send them my way any way you see fit. The project is also hosted on google code, but I'm not too happy with the interface and am considering moving it to sourceforge mainly for svn and issue tracking. If you have strong opinions one way or the other, let me know.
Anyway, for now, play with it, let me know about bugs, if you want to write a localised module for a particular language, feel free to do so and send it in.
Philip
[1] - http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html [2] - http://php.net/strftime [3] - http://hacks.bluesmoon.info/strftime/localisation.html