How To Calculate Dates In Perl Using Date::Manip

Published Date Author: , Posted September 18th, 2017 at 5:42:51pm
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 ($cmp < 0) { print "Older than marker!\n"; } else { print "Same date or later than marker\n"; } 

No comments as yet.

Leave Your Comment  Leave a comment

All fields marked with "*" are required.