note 36273 added to function.date

From: Date: Fri, 03 Oct 2003 02:54:40 +0000
Subject: note 36273 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-57641@lists.php.net to get a copy of this message
en: This is a french version of the function date() fr: Voici une version française de la fonction date() <? function datefr ($format, $timestamp = null) { $tTrans = Array ( "lw" => Array ( "Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi" ), "Dw" => Array ( "Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam" ), "Fn" => Array ( "", "Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre" ), "Mn" => Array ( "", "Jan", "Fév", "Mar", "Avr", "Mai", "Jun", "Jui", "Aou", "Sep", "Oct", "Nov", "Déc" ), "Sj" => Array ( "", "er", "eme" ) ); if ($timestamp == null) $timestamp = time (); foreach ($tTrans as $ref => $tVal) $format = str_replace ($ref [0], "\\\\\\".$ref [0], $format); $format = date ($format, $timestamp); foreach ($tTrans as $ref => $tVal) $format = str_replace ("\\".$ref [0], $tVal [min (date ($ref [1], $timestamp), count ($tVal)-1)], $format); return $format; } ?> ---- Manual Page -- http://www.php.net/manual/en/function.date.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+36273 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+36273&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+36273&report=yes

« previous php.notes (#57641) next »