in reply to formatting datetime with strftime
#!perl -w use strict; use DateTime::Format::CLDR; my $datetimestring = "4/5/13 16:09"; my $cldr1 = new DateTime::Format::CLDR( pattern => 'M/d/yy HH:mm', ); my $dt1 = $cldr1->parse_datetime($datetimestring); print $cldr1->format_datetime($dt1), "\n"; my $cldr2 = new DateTime::Format::CLDR( pattern => 'MMMM dd yyyy HH:mm:ss', locale => 'en_US', time_zone => 'GMT', ); print $cldr2->format_datetime($dt1), " GMT\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: formatting datetime with strftime
by GeneralElektrix (Acolyte) on Jul 22, 2013 at 18:08 UTC |
In Section
Seekers of Perl Wisdom