- or download this
my $t = Time::Piece->strptime("Sunday 3rd Nov, 1943",
"%A %drd %b, %Y");
print $t->strftime("%a, %d %b %Y");
- or download this
Wed, 03 Nov 1943
- or download this
#!/usr/bin/perl
# vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:
...
my $u = Time::Piece->strptime( $str, $pattern, );
print "Time is:\n", $u->strftime( $pattern ), "\n";
- or download this
$ perl ./tp_test.pl
Time is:
...
"Wed, 13 Jan 2021 22:21:49 CST", "%a, %d %b %Y %T %Z")
called at ./tp_test.pl line 23
$
- or download this
$ perl ./tp_test.pl
Time is:
...
Time is:
Wed, 13 Jan 2021 22:21:49 CST
$