From 973e42d10f5a70fc26f1e133f8006160c9de8169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= <rdoursenaud@gpcsolutions.fr> Date: Wed, 25 Nov 2015 19:30:20 +0100 Subject: [PATCH] FIX #4097 Public holiday calculation The last day was ommitted and never parsed. If this day was a saturday, sunday or public holiday day, it was not computed. --- 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 924d3da2259..2604d6c9086 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -566,7 +566,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode='FR') if ((($timestampEnd - $timestampStart) % 86400) != 0) return 'ErrorDates must use same hours and must be GMT dates'; $i=0; - while ($timestampStart < $timestampEnd && ($i < 50000)) // Loop end when equals (Test on i is a security loop to avoid infinite loop) + while ($timestampStart <= $timestampEnd && ($i < 50000)) // Loop end when equals (Test on i is a security loop to avoid infinite loop) { $ferie=false; $countryfound=0; -- GitLab