Basic class date diff calc fix for including last day
This commit is contained in:
1 parent
0d89eea1af
commit
d0de3821f8
1 file changed
+2
@@ -1459,6 +1459,8 @@ class Basic
|
||||
$days = array ();
|
||||
$start = new \DateTime($start_date);
|
||||
$end = new \DateTime($end_date);
|
||||
// so we include the last day too, we need to add +1 second in the time
|
||||
$end->setTime(0, 0, 1);
|
||||
|
||||
$days[0] = $end->diff($start)->days;
|
||||
|
||||
|
||||
Reference in new issue
Block a user