The accepted answer in this question is: Calculating working days is a mistake. Just check
echo getWorkingDays("2012-01-01","2012-05-01",$holidays);
The problem is this snippet:
$days = ($endDate - $startDate) / 86400 + 1;
So a minimal non-working example:
Why is this expression:
($endDate - $startDate) / (60*60*24);
Not an integer for:
$startDate = strtotime("2012-01-01"); $endDate = strtotime("2012-05-01");
date php datetime
mnowotka Sep 19 2018-12-12T00: 00Z
source share