diff --git a/functions/functions.php b/functions/functions.php index 0528dc6..e10ec8d 100644 --- a/functions/functions.php +++ b/functions/functions.php @@ -283,7 +283,7 @@ function formatPeriode($dateTxtDeb='', $dateTxtFin='', $format="mysql_datetime", $deb_month = $GLOBALS['PRINT_MOIS_COURT'][ intval($deb->format("m")) ]; $deb_year = intval( $deb->format("Y") ); $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 = ""; if(!$fin) { @@ -291,16 +291,16 @@ function formatPeriode($dateTxtDeb='', $dateTxtFin='', $format="mysql_datetime", if($time) $ret .= " à ".$deb_time; } else { - $same_date = $deb->format('mysql_date') == $fin->format('mysql_date'); - $same_time = $time ? $debut->format('time') == $fin->format('time') : false; - $same_month = $deb->format('Y-m') == $fin->format('Y-m'); - $same_year = $deb->format('Y') == $fin->format('Y'); + $same_date = $deb->format('mysql_date') == $fin->format('mysql_date'); + $same_time = $time ? $deb->format('time') == $fin->format('time') : false; + $same_month = $deb->format('Y-m') == $fin->format('Y-m'); + $same_year = $deb->format('Y') == $fin->format('Y'); $fin_day = intval( $fin->format("j") );; $fin_month = $GLOBALS['PRINT_MOIS_COURT'][ intval($fin->format("m")) ]; $fin_year = intval( $fin->format("Y") ); $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 $ret = "le ".$deb_date;