in reply to POSIX strftime format question
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: POSIX strftime format question
by geektron (Curate) on Oct 22, 2004 at 10:25 UTC | |
|
Re^2: POSIX strftime format question
by geektron (Curate) on Oct 22, 2004 at 10:29 UTC |