From b6945d0c2792356009bf75ea05fa395c655fc74d Mon Sep 17 00:00:00 2001 From: Pichi1966 <57623859+josett225@users.noreply.github.com> Date: Fri, 8 Nov 2024 14:46:44 +0100 Subject: [PATCH] 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 --- htdocs/core/lib/date.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 278b782ed4a..878c4fdfa50 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -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 {