yandex
loader

please wait

  • Lucky Negi Jan-23-2019 10:24:58 AM ( 3 weeks ago )

    how to check negative date in php ?

  • Imran Malik Jan-23-2019 11:28:41 AM ( 3 weeks ago )

    use  invert method example:$date1=date_create("2013-03-15");

    $date2=date_create("2013-12-12");

    $diff=date_diff($date2,$date1);

    $check= $diff->format("%R%a ");

    echo $check;

    if($diff->invert==1){

      echo 'negative date';

    }else{

      echo 'positive date';

    }

Please login

Similar Discussion

Recommended For You