Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Compare two dates

by AnomalousMonk (Archbishop)
on Jul 22, 2019 at 20:24 UTC ( [id://11103165] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    c:\@Work\Perl\monks>perl -wMstrict -le
    "use feature 'say';
    ...
         : $d2->ymd .' is greater or equal to ' . $d1->ymd;
    "
    1999-08-01 is greater than 2019-06-08
    
  2. or download this
    c:\@Work\Perl\monks>perl -wMstrict -le
    "use feature 'say';
    ...
     say sprintf '%s is %s %s', $d1->ymd, $comparison, $d2->ymd;
    "
    1999-08-01 is less than 2019-06-08