From 8c720aee1f9258cdc8f3b0289bfbe67ce4a1c39c Mon Sep 17 00:00:00 2001 From: KONE SOREL Date: Sat, 28 Mar 2026 18:30:21 +0000 Subject: [PATCH] dfg --- Framework/Functions.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Framework/Functions.php b/Framework/Functions.php index 4c8df70..d60d0e4 100755 --- a/Framework/Functions.php +++ b/Framework/Functions.php @@ -166,15 +166,17 @@ function dateEng($d) function dateLang($d, $lang=null) { - if (isset($lang) && $lang=="en_US") - { - return dateEng($d); - - } - else - { - return dateFr($d); - } + $date = DateTime::createFromFormat('d/m/Y', $d); + + if (!$date) { + return "Format de date invalide"; + } + + if (isset($lang) && $lang=="en_US") { + return $date->format('m/d/Y'); // format US + } else { + return $date->format('d/m/Y'); // format FR + } } function dateheureFr($d)