in reply to Two digit year with DateTime?

Hello mitabrev,

In case you do not mind using another module Date::Manip see bellow below:

#!/usr/bin/perl use strict; use warnings; use Date::Manip; use feature 'say'; # my $tz = new Date::Manip::TZ; say UnixDate(DateCalc( ParseDate('yesterday'), $_ . " days later") , "%m-%d-%y") for (1..7); __END__ $ perl test.pl 03-11-19 03-12-19 03-13-19 03-14-19 03-15-19 03-16-19 03-17-19

Update: Removing unnecessary line of code.

Hope this helps, BR.

Seeking for Perl wisdom...on the process of learning...not there...yet!

Replies are listed 'Best First'.
Re^2: Two digit year with DateTime?
by mitabrev (Novice) on Mar 11, 2019 at 12:16 UTC
    Perfect! Thanks!