On Monday 28 Apr 2008, Philip Tellis wrote:
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.
Nice!
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
Hmm, why not use the glibc strftime (or libc strftime) as the base model? That makes it more useful in more languages. I admit I haven't bothered to check the differences between the PHP and the libc strftime formats.
Regards,
-- Raju