# How to add two working days to current date?

Hi,

How can I add two working days to current date?
This code add two days to current ways, but not limited to working days.

``````echo date('Y-m-d', strtotime('2015-08-06'. ' + 2 days'));
``````
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
Do non-working days include public / bank holidays?

Take a look at this code from the comments page of the php date function

``````function networkdays(\$s, \$e, \$holidays = array()) {
// If the start and end dates are given in the wrong order, flip them.
if (\$s > \$e)
return networkdays(\$e, \$s, \$holidays);

// Find the ISO-8601 day of the week for the two dates.
\$sd = date("N", \$s);
\$ed = date("N", \$e);

// Find the number of weeks between the dates.
\$w = floor((\$e - \$s)/(86400*7));    # Divide the difference in the two times by seven days to get the number of weeks.
if (\$ed >= \$sd) { \$w--; }        # If the end date falls on the same day of the week or a later day of the week than the start date, subtract a week.

// Calculate net working days.
\$nwd = max(6 - \$sd, 0);    # If the start day is Saturday or Sunday, add zero, otherewise add six minus the weekday number.
\$nwd += min(\$ed, 5);    # If the end day is Saturday or Sunday, add five, otherwise add the weekday number.
\$nwd += \$w * 5;        # Add five days for each week in between.

// Iterate through the array of holidays. For each holiday between the start and end dates that isn't a Saturday or a Sunday, remove one day.
foreach (\$holidays as \$h) {
\$h = strtotime(\$h);
if (\$h > \$s && \$h < \$e && date("N", \$h) < 6)
\$nwd--;
}

return \$nwd;
}
``````
Commented:

Experts Exchange Solution brought to you by