0

I have date

$date = '2018-04-20'
//Format 'yyyy-mm-dd'

How i can get string + 1 WORKDAYS like

date('Y-m-d',strtotime("$date + 1 days"));

so the result is '2018-04-23' not '2018-04-21' because it's saturday

note : workdays is monday till friday

Thanks

Drajad
  • 53
  • 7

1 Answers1

0

Then try like this for weekdays,

<?php
 $date = '2018-04-20';
 echo date ( 'Y-m-d' , strtotime ( $date. ' +1 weekdays' ) );
?>

Program Output

2018-04-23

DEMO: https://eval.in/979016

A l w a y s S u n n y
  • 36,497
  • 8
  • 60
  • 103