Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Date-manipulation/Perl/date-manipulation.pl
Normal file
11
Task/Date-manipulation/Perl/date-manipulation.pl
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
use DateTime;
|
||||
use DateTime::Format::Strptime 'strptime';
|
||||
use feature 'say';
|
||||
|
||||
my $input = 'March 7 2009 7:30pm EST';
|
||||
$input =~ s{EST}{America/New_York};
|
||||
|
||||
say strptime('%b %d %Y %I:%M%p %O', $input)
|
||||
->add(hours => 12)
|
||||
->set_time_zone('America/Edmonton')
|
||||
->format_cldr('MMMM d yyyy h:mma zzz');
|
||||
Loading…
Add table
Add a link
Reference in a new issue