Function dol_get_first_day() should return int but returns string.
Function getWeekNumber() should return int but returns string.
This commit is contained in:
thibdrev 2024-01-15 18:54:33 +01:00 committed by GitHub
parent e6c3c5993d
commit f41a5bc752
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -579,7 +579,7 @@ function dol_get_first_day($year, $month = 1, $gm = false)
if ($year > 9999) {
return '';
}
return dol_mktime(0, 0, 0, $month, 1, $year, $gm);
return (int) dol_mktime(0, 0, 0, $month, 1, $year, $gm);
}
@ -1170,5 +1170,5 @@ function getWeekNumber($day, $month, $year)
{
$date = new DateTime($year.'-'.$month.'-'.$day);
$week = $date->format("W");
return $week;
return (int) $week;
}