Trouver une ressource (Nouvelle version du moteur, plus rapide & pertinent, essayez le !)
Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum.
Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !
FONCTION DATE() EN FRANÇAIS
Information sur la source
Description
La fonction Date() traduite entiérement en Français...
Source
- // Function DateFR(date to return, [timestamp])
- // By CalistX
- // 11/05/02 - 21:41
-
- Function DateFR($what_date, $timestamp = "") {
- $returned = FALSE;
- $jour_c = Array("Mon" => "Lun", "Tue" => "Mar", "Wed" => "Mer", "Thu" => "Jeu", "Fri" => "Ven", "Sat" => "Sam", "Sun" => "Dim");
- $jour_l = Array("Monday" => "Lundi", "Tuesday" => "Mardi", "Wednesday" => "Mercredi", "Thursday" => "Jeudi", "Friday" => "Vendredi", "Saturday" => "Samedi", "Sunday" => "Dimanche");
- $mois_c = Array("1" => "Jan", "2" => "Fév", "3" => "Mar", "4" => "Avr", "5" => "Mai", "6" => "Jui", "7" => "Jui", "8" => "Aoû", "9" => "Sep", "10" => "Oct", "11" => "Nov", "12" => "Déc");
- $mois_l = Array("1" => "Janvier", "2" => "Février", "3" => "Mars", "4" => "Avril", "5" => "Mai", "6" => "Juin", "7" => "Juillet", "8" => "Août", "9" => "Septembre", "10" => "Octobre", "11" => "Novembre", "12" => "Décembre");
-
- If ($what_date == "a") {
- If (Date("a", $timestamp) == "am") {
- return "matin";
- $returned = TRUE;
- }
- If (Date("a", $timestamp) == "pm") {
- return "après-midi";
- $returned = TRUE;
- }
- If (empty($timestamp)) {
- return "Timestamp Incorrect";
- $returned = TRUE;
- }
- }
-
- If ($what_date == "A") {
- If (Date("A", $timestamp) == "AM") {
- return "MATIN";
- $returned = TRUE;
- }
- If (Date("A", $timestamp) == "PM") {
- return "APRES-MIDI";
- $returned = TRUE;
- }
- If (empty($timestamp)) {
- return "Timestamp Incorrect";
- $returned = TRUE;
- }
- }
-
- If ($what_date == "B") {
- return Date("B");
- $returned = TRUE;
- }
-
- If ($what_date == "d") {
- return Date("d");
- $returned = TRUE;
- }
-
- If ($what_date == "D") {
- return $jour_c[Date("D")];
- $returned = TRUE;
- }
-
- If ($what_date == "F") {
- return $mois_l[Date("n")];
- $returned = TRUE;
- }
-
- If ($what_date == "g") {
- return Date("g");
- $returned = TRUE;
- }
-
- If ($what_date == "G") {
- return Date("G");
- $returned = TRUE;
- }
-
- If ($what_date == "h") {
- return Date("h");
- $returned = TRUE;
- }
-
- If ($what_date == "H") {
- return Date("H");
- $returned = TRUE;
- }
-
- If ($what_date == "i") {
- return Date("i");
- $returned = TRUE;
- }
-
- If ($what_date == "I") {
- return Date("I");
- $returned = TRUE;
- }
-
- If ($what_date == "j") {
- return Date("j");
- $returned = TRUE;
- }
-
- If ($what_date == "l") {
- return $jour_l[Date("l")];
- $returned = TRUE;
- }
-
- If ($what_date == "L") {
- return Date("L");
- $returned = TRUE;
- }
-
- If ($what_date == "m") {
- return Date("m");
- $returned = TRUE;
- }
-
- If ($what_date == "M") {
- return $mois_c[Date("n")];
- $returned = TRUE;
- }
-
- If ($what_date == "n") {
- return Date("n");
- $returned = TRUE;
- }
-
- If ($what_date == "O") {
- return Date("O");
- $returned = TRUE;
- }
-
- If ($what_date == "r") {
- return DateFR("D").", ".DateFR("d")." ".DateFR("M")." ".DateFR("Y")." ".DateFR("H").":".DateFR("i").":".DateFR("s")." ".DateFR("O");
- $returned = TRUE;
- }
-
- If ($what_date == "s") {
- return Date("s");
- $returned = TRUE;
- }
-
- If ($what_date == "S") {
- If (Date("S") == "th") {
- return "éme";
- $returned = TRUE;
- }
- If (Date("S") == "nd") {
- return "ére";
- $returned = TRUE;
- }
- }
-
- If ($what_date == "t") {
- return Date("t");
- $returned = TRUE;
- }
-
- If ($what_date == "T") {
- return Date("T");
- $returned = TRUE;
- }
-
- If ($what_date == "U") {
- return Date("U", $timestamp);
- $returned = TRUE;
- }
-
- If ($what_date == "w") {
- return Date("w");
- $returned = TRUE;
- }
-
- If ($what_date == "Y") {
- return Date("Y");
- $returned = TRUE;
- }
-
- If ($what_date == "y") {
- return Date("y");
- $returned = TRUE;
- }
-
- If ($what_date == "Z") {
- return Date("Z");
- $returned = TRUE;
- }
-
- If ($what_date == "z") {
- return Date("z");
- $returned = TRUE;
- }
-
- If ($returned == FALSE) {
- return Date($what_date);
- }
- }
// Function DateFR(date to return, [timestamp])
// By CalistX
// 11/05/02 - 21:41
Function DateFR($what_date, $timestamp = "") {
$returned = FALSE;
$jour_c = Array("Mon" => "Lun", "Tue" => "Mar", "Wed" => "Mer", "Thu" => "Jeu", "Fri" => "Ven", "Sat" => "Sam", "Sun" => "Dim");
$jour_l = Array("Monday" => "Lundi", "Tuesday" => "Mardi", "Wednesday" => "Mercredi", "Thursday" => "Jeudi", "Friday" => "Vendredi", "Saturday" => "Samedi", "Sunday" => "Dimanche");
$mois_c = Array("1" => "Jan", "2" => "Fév", "3" => "Mar", "4" => "Avr", "5" => "Mai", "6" => "Jui", "7" => "Jui", "8" => "Aoû", "9" => "Sep", "10" => "Oct", "11" => "Nov", "12" => "Déc");
$mois_l = Array("1" => "Janvier", "2" => "Février", "3" => "Mars", "4" => "Avril", "5" => "Mai", "6" => "Juin", "7" => "Juillet", "8" => "Août", "9" => "Septembre", "10" => "Octobre", "11" => "Novembre", "12" => "Décembre");
If ($what_date == "a") {
If (Date("a", $timestamp) == "am") {
return "matin";
$returned = TRUE;
}
If (Date("a", $timestamp) == "pm") {
return "après-midi";
$returned = TRUE;
}
If (empty($timestamp)) {
return "Timestamp Incorrect";
$returned = TRUE;
}
}
If ($what_date == "A") {
If (Date("A", $timestamp) == "AM") {
return "MATIN";
$returned = TRUE;
}
If (Date("A", $timestamp) == "PM") {
return "APRES-MIDI";
$returned = TRUE;
}
If (empty($timestamp)) {
return "Timestamp Incorrect";
$returned = TRUE;
}
}
If ($what_date == "B") {
return Date("B");
$returned = TRUE;
}
If ($what_date == "d") {
return Date("d");
$returned = TRUE;
}
If ($what_date == "D") {
return $jour_c[Date("D")];
$returned = TRUE;
}
If ($what_date == "F") {
return $mois_l[Date("n")];
$returned = TRUE;
}
If ($what_date == "g") {
return Date("g");
$returned = TRUE;
}
If ($what_date == "G") {
return Date("G");
$returned = TRUE;
}
If ($what_date == "h") {
return Date("h");
$returned = TRUE;
}
If ($what_date == "H") {
return Date("H");
$returned = TRUE;
}
If ($what_date == "i") {
return Date("i");
$returned = TRUE;
}
If ($what_date == "I") {
return Date("I");
$returned = TRUE;
}
If ($what_date == "j") {
return Date("j");
$returned = TRUE;
}
If ($what_date == "l") {
return $jour_l[Date("l")];
$returned = TRUE;
}
If ($what_date == "L") {
return Date("L");
$returned = TRUE;
}
If ($what_date == "m") {
return Date("m");
$returned = TRUE;
}
If ($what_date == "M") {
return $mois_c[Date("n")];
$returned = TRUE;
}
If ($what_date == "n") {
return Date("n");
$returned = TRUE;
}
If ($what_date == "O") {
return Date("O");
$returned = TRUE;
}
If ($what_date == "r") {
return DateFR("D").", ".DateFR("d")." ".DateFR("M")." ".DateFR("Y")." ".DateFR("H").":".DateFR("i").":".DateFR("s")." ".DateFR("O");
$returned = TRUE;
}
If ($what_date == "s") {
return Date("s");
$returned = TRUE;
}
If ($what_date == "S") {
If (Date("S") == "th") {
return "éme";
$returned = TRUE;
}
If (Date("S") == "nd") {
return "ére";
$returned = TRUE;
}
}
If ($what_date == "t") {
return Date("t");
$returned = TRUE;
}
If ($what_date == "T") {
return Date("T");
$returned = TRUE;
}
If ($what_date == "U") {
return Date("U", $timestamp);
$returned = TRUE;
}
If ($what_date == "w") {
return Date("w");
$returned = TRUE;
}
If ($what_date == "Y") {
return Date("Y");
$returned = TRUE;
}
If ($what_date == "y") {
return Date("y");
$returned = TRUE;
}
If ($what_date == "Z") {
return Date("Z");
$returned = TRUE;
}
If ($what_date == "z") {
return Date("z");
$returned = TRUE;
}
If ($returned == FALSE) {
return Date($what_date);
}
}
Conclusion
Petit probléme : La fonction ne connait pas plusieurs arguments comme DateFR("h F m") comme la fonction originale. Dans ces cas-là, elle transmet la commande à la fonction originale.
Fichier Zip
Pour les "Membres Club", vous pouvez télécharger directement un fichier contenu dans le zip sans télécharger le zip en entier !
Télécharger le zip
Sources de la même categorie
Commentaires
|
|