Tom Medley Tom Medley - 1 year ago 83
PHP Question

Working days (Mon-Fri) in PHP

Is there a way to use

to add working days (Monday to Friday) to a date? Or some other method? What I want to do is:

date ( 'Y-m-j' , strtotime ( '+3 working days' ) )

Answer Source

If you are limiting to weekdays use the string weekdays.

echo date ( 'Y-m-j' , strtotime ( '3 weekdays' ) );

This should jump you ahead by 3 weekdays, so if it is Thursday it will add the additional weekend time.


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download