Yeah, strftime won't handle that.
It's simple enough to fix it using Lingua::EN::Number::Ordinate tho'.
#!/usr/bin/perl use strict; use warnings; use POSIX 'strftime'; use Lingua::EN::Numbers::Ordinate; my $date = strftime '%B %d, %Y', localtime; $date =~ s/(\d+)/ordinate($1)/e; print "$date\n"
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: POSIX strftime format question
by davorg
in thread POSIX strftime format question
by geektron
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |