in reply to adding st,nd,rd and th to numbers
Here's the code that I used when I needed to do this:
if($mday =~ /(?<!1)1$/) { $date_word = $mday . 'st' } elsif($mday =~ /(?<!1)2$/) { $date_word = $mday . 'nd' } elsif($mday =~ /(?<!1)3$/) { $date_word = $mday . 'rd' } else { $date_word = $mday . 'th' }
Using a module (as mentioned above) is probably a better idea, however...
|
|---|