2008/4/28 Raj Mathur raju@linux-delhi.org:
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
I suppose you're right. Care to send in a patch? :P
The glibc version borrows from many standards, and supports 6 additional formats: %F, %k, %l, %P, %s and %+. This is in addition to the modified formats specified by opengroup. I could probably do these 6 formats, but someone else will have to put in the effort to do the 19 modified formats.
Also noticed that I need to make %p and %P easy to localise.