PHP Next Working Day

This is post is now quite old and the the information it contains may be out of date or innacurate.

If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub

Here’s a nice little PHP snippet for you. The next weekday as a DD/MM/YYYY string:

<?php
if(preg_match('%(Sat|Sun|Fri)%', date('D'))){
    $next_working_day = date('d/m/Y', strtotime('next Monday'));
}else{
    $next_working_day = date('d/m/Y', strtotime('+1 day'));
}
echo $next_working_day;
?>

Tags: phpdatesnippetworking dayweekday