Debug last commit

This commit is contained in:
Adrien RENARD 2025-03-10 16:59:06 +01:00
parent 32b21fb14e
commit bf79cba889
1 changed files with 6 additions and 6 deletions

View File

@ -283,7 +283,7 @@ function formatPeriode($dateTxtDeb='', $dateTxtFin='', $format="mysql_datetime",
$deb_month = $GLOBALS['PRINT_MOIS_COURT'][ intval($deb->format("m")) ]; $deb_month = $GLOBALS['PRINT_MOIS_COURT'][ intval($deb->format("m")) ];
$deb_year = intval( $deb->format("Y") ); $deb_year = intval( $deb->format("Y") );
$deb_date = "$deb_day $deb_month $deb_year"; $deb_date = "$deb_day $deb_month $deb_year";
$deb_time = $deb->format("H")."h".(intval($deb->format("i"))>0 ? $deb->format("i") : ""); $deb_time = $deb->format("G")."h".(intval($deb->format("i"))>0 ? $deb->format("i") : "");
$ret = ""; $ret = "";
if(!$fin) { if(!$fin) {
@ -291,16 +291,16 @@ function formatPeriode($dateTxtDeb='', $dateTxtFin='', $format="mysql_datetime",
if($time) $ret .= " à ".$deb_time; if($time) $ret .= " à ".$deb_time;
} }
else { else {
$same_date = $deb->format('mysql_date') == $fin->format('mysql_date'); $same_date = $deb->format('mysql_date') == $fin->format('mysql_date');
$same_time = $time ? $debut->format('time') == $fin->format('time') : false; $same_time = $time ? $deb->format('time') == $fin->format('time') : false;
$same_month = $deb->format('Y-m') == $fin->format('Y-m'); $same_month = $deb->format('Y-m') == $fin->format('Y-m');
$same_year = $deb->format('Y') == $fin->format('Y'); $same_year = $deb->format('Y') == $fin->format('Y');
$fin_day = intval( $fin->format("j") );; $fin_day = intval( $fin->format("j") );;
$fin_month = $GLOBALS['PRINT_MOIS_COURT'][ intval($fin->format("m")) ]; $fin_month = $GLOBALS['PRINT_MOIS_COURT'][ intval($fin->format("m")) ];
$fin_year = intval( $fin->format("Y") ); $fin_year = intval( $fin->format("Y") );
$fin_date = "$fin_day $fin_month $fin_year"; $fin_date = "$fin_day $fin_month $fin_year";
$fin_time = $fin->format("H")."h".(intval($fin->format("i"))>0 ? $fin->format("i") : ""); $fin_time = $fin->format("G")."h".(intval($fin->format("i"))>0 ? $fin->format("i") : "");
if($same_date) { // MEME JOUR if($same_date) { // MEME JOUR
$ret = "le ".$deb_date; $ret = "le ".$deb_date;