How To Calculate Dates In Perl Using Date::Manip
erics, 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"; } |
Leave Your Comment
All fields marked with "*" are required.