How To Calculate Dates In Perl Using Date::Manip

Author: , September 18th, 2017

1 2 3 4 my $created_at  = ’2017-09-18T13:43:40Z’; my $marker      = DateCalc(’today’,’30 days ago’); my $cmp = Date_Cmp($created_at,$marker); if ($cmp < 0) { print "Older than marker!\n"; } else { print "Same date or later than marker\n"; } my $created_at = ’2017-09-18T13:43:40Z’; my $marker = DateCalc(‘today’,’30 days ago’); my $cmp = Date_Cmp($created_at,$marker); if […]