Merge pull request #20584 from marc-dll/14.0_FIX_holiday_list_end_shift

FIX: action comm list: holiday last day not included + handle halfdays
This commit is contained in:
Laurent Destailleur 2022-04-07 18:19:56 +02:00 committed by GitHub
commit ee66869c4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -979,8 +979,8 @@ if ($resql) {
$event->type = 'holiday';
$event->type_picto = 'holiday';
$event->datep = $db->jdate($obj->date_start);
$event->datef = $db->jdate($obj->date_end);
$event->datep = $db->jdate($obj->date_start) + (empty($halfday) || $halfday == 1 ? 0 : 12 * 60 * 60 - 1);
$event->datef = $db->jdate($obj->date_end) + (empty($halfday) || $halfday == -1 ? 24 : 12) * 60 * 60 - 1;
$event->date_start_in_calendar = $event->datep;
$event->date_end_in_calendar = $event->datef;