PHP & MySQL | Tutorials

David Carr

strtotime Add Two Working Days

There are times you want to add days to a date but only working days, so weekends are ignored.

Thankfully strtotime makes this super easy simply use weekdays like this:

date('Y-m-d H:i:s', strtotime('+2 weekdays'))

 

Support my work by donating with PayPal.

Subscribe to my newsletter

Subscribe and get my books and product announcements.

© 2009 - 2020 DC Blog. All code MIT license. All rights reserved.