in reply to English Date-Suffixes
There are still a couple of loose ones in there. -2 or -3 if you count the superfluous ;
($£=pop)=~/1./?0:qw(0 st nd rd)[$£%10]or'th'
My best alternate ain't even close, substr is too long.
sub nthit{ substr'thstndrd',($£=pop)=~/1./||($£%=10)>3?0:2*$£,2 }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: English Date-Suffixes
by John M. Dlugosz (Monsignor) on Nov 04, 2002 at 21:32 UTC | |
by BrowserUk (Patriarch) on Nov 04, 2002 at 21:45 UTC | |
by John M. Dlugosz (Monsignor) on Nov 04, 2002 at 21:56 UTC | |
by BrowserUk (Patriarch) on Nov 04, 2002 at 22:42 UTC | |
by John M. Dlugosz (Monsignor) on Nov 04, 2002 at 22:58 UTC |