4
In PHP, I have a certain date, coming from the database, which is the date a request was made.
I need to add 5 working days on that date, which is the deadline for the request to be delivered. In this count I need to skip the weekends.
I currently have the following code to add 5 days, but the part about skipping the weekends is that it’s been hard.
Example:
$data_banco = new DateTime('2016-07-07'); // Quinta
$data_prazo = clone $data_banco;
$data_prazo->modify('+5 days');
What’s the simplest way to add dates, skipping the weekend, in PHP?
Related http://answall.com/a/50716/70
– Bacco
These "speaking" functions, I just discovered that the documentation calls "relative formats", ie relative formatting.
– Wallace Maxters