@ 2018-05-16T15:02:02Z <?php
$outOfStock = true;
echo date('d-m-Y') , "\n"; // as baseline
$deliveryDate = date('d-m-Y', strtotime('+' . 1+$outOfStock . ' day')); // treat bool as int: instock=1, outofstock=2
echo $deliveryDate , "\n"; // as proof
$allHolidays = array('17-05-2018', '18-05-2018', '19-05-2018');
while(in_array($deliveryDate,$allHolidays)){
$deliveryDate = date('d-m-Y', strtotime("$deliveryDate +1 day"));
}
echo $deliveryDate;
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.1.0 - 7.1.33 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.27 , 8.2.0 - 8.2.17 , 8.3.0 - 8.3.4 16-05-2018
18-05-2018
20-05-2018 Output for 7.4.0 - 7.4.33 Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /in/5RcEZ on line 5
16-05-2018
18-05-2018
20-05-2018 preferences:dark mode live preview
156.79 ms | 401 KiB | 187 Q