in reply to POSIX strftime format question
(Mostly stolen from peterS in #perl at freenode.net)sub suffer { local $_ = shift; my$suf = 'th'; if( !/1.$/ ) { $suf = 'st' if /1$/; $suf = 'nd' if /2$/; $suf = 'r +d' if /3$/ } return $_.$suf; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: POSIX strftime format question
by bart (Canon) on Oct 22, 2004 at 10:53 UTC | |
|
Re^2: POSIX strftime format question
by Anonymous Monk on Oct 22, 2004 at 16:49 UTC |