- ###############################################################################
- # Formate une heure selon un timestamp (heure UNIX).
- ###############################################################################
-
- function cz_heure($heure, $sep)
- {
- $retour = getdate($heure);
- $h = $retour["hours"];
- $m = $retour["minutes"];
- $s = $retour["seconds"];
-
- $z = "0";
-
- $h2 = ($h < 10)?$z.$h:$h;
-
- $m2 = ($m < 10)?$z.$m:$m;
-
- $s2 = ($s < 10)?$z.$s:$s;
-
- $texte = $h2.$sep.$m2.$sep.$s2;
- return $texte;
- }
-
- ###############################################################################
- # Formate une date selon un timestamp (heure UNIX).
- ###############################################################################
-
- function cz_date($date, $sep)
- {
- $retour = getdate($date);
- $j = $retour["mday"];
- $m = $retour["mon"];
- $a = $retour["year"];
-
- $z = "0";
-
- $j2 = ($j < 10)?$z.$j:$j;
-
- $m2 = ($m < 10)?$z.$m:$m;
-
- $texte = $j2.$sep.$m2.$sep.$a;
- return $texte;
- }
###############################################################################
# Formate une heure selon un timestamp (heure UNIX).
###############################################################################
function cz_heure($heure, $sep)
{
$retour = getdate($heure);
$h = $retour["hours"];
$m = $retour["minutes"];
$s = $retour["seconds"];
$z = "0";
$h2 = ($h < 10)?$z.$h:$h;
$m2 = ($m < 10)?$z.$m:$m;
$s2 = ($s < 10)?$z.$s:$s;
$texte = $h2.$sep.$m2.$sep.$s2;
return $texte;
}
###############################################################################
# Formate une date selon un timestamp (heure UNIX).
###############################################################################
function cz_date($date, $sep)
{
$retour = getdate($date);
$j = $retour["mday"];
$m = $retour["mon"];
$a = $retour["year"];
$z = "0";
$j2 = ($j < 10)?$z.$j:$j;
$m2 = ($m < 10)?$z.$m:$m;
$texte = $j2.$sep.$m2.$sep.$a;
return $texte;
}