Help for this page

Select Code to Download


  1. or download this
    say DateTime->compare( $d1, $d2 ) 
        ? $d1->ymd .' is greater than ' . $d2->ymd 
        : $d2->ymd .' is greater or equal to ' . $d1->ymd;
    
  2. or download this
    say $d1->ymd . ' is ' . ('earlier than', 'equal to', 'later than')[Dat
    +eTime->compare( $d1, $d2 ) + 1] . ' ' . $d2->ymd;