On Sat, May 7, 2011 18:39, Chris G wrote:
I'd like to output dates like:-
1st September 2009 23rd August 1967
I.e. I want the 'st' and 'rd' suffixes for the day. It doesn't look like strftime() offers an option to do this. I can obviously do it myself with a switch/case or some if/then/else statements but I was wondering if there's anything ready-made that I've missed.
Perl can do this:
martin@olga:~$ perl -e 'use Date::Format; @lt = localtime(time); print strftime("%o %B %Y\n", @lt);' 7th May 2011