Fix function num_between_day in date.lib.php in Dev code v21 (#31732)

When debugging Asset Module, I discovered that function num_between_day is returning 0 when $timestampStart equals (==) $timestampEnd and $lastday == 1
Normally it has to return
0 if $lastday = 0
1 if $lastday = 1
This commit is contained in:
Pichi1966
2024-11-08 14:46:44 +01:00
committed by GitHub
parent 9ae591d662
commit b6945d0c27

View File

@@ -1024,7 +1024,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $country_code = '',
*/
function num_between_day($timestampStart, $timestampEnd, $lastday = 0)
{
if ($timestampStart < $timestampEnd) {
if ($timestampStart <= $timestampEnd) {
if ($lastday == 1) {
$bit = 0;
} else {