In PHP, I have a certain date, coming from the database, which is the date a request was made.
I need to add 5 business days to this date, which is the deadline for the request to be delivered. At this count I need to ignore the weekends.
I currently have the following code to add 5 days, but the weekend skipping part is being difficult.
Example:
$data_banco = new DateTime('2016-07-07'); // Quinta
$data_prazo = clone $data_banco;
$data_prazo->modify('+5 days');
What is the simplest way to add dates, skipping the weekend in PHP?