<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.datetime.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'function.strftime.php',
    1 => 'strftime',
    2 => 'Formate une date/heure locale avec la configuration locale',
  ),
  'up' => 
  array (
    0 => 'ref.datetime.php',
    1 => 'Fonctions Date/Heure',
  ),
  'prev' => 
  array (
    0 => 'function.mktime.php',
    1 => 'mktime',
  ),
  'next' => 
  array (
    0 => 'function.strptime.php',
    1 => 'strptime',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/datetime/functions/strftime.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.strftime" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">strftime</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">strftime</span> &mdash; <span class="dc-title">Formate une date/heure locale avec la configuration locale</span></p>

 </div>
 
 <div id="function.strftime-refsynopsisdiv">
  <div class="warning"><strong class="warning">Avertissement</strong><p class="simpara">Cette fonction
est <em>OBSOLÈTE</em> à partir de PHP 8.1.0.
Il est fortement recommandé de les éviter.</p></div>
<p class="para">
 Les alternatives à cette fonction incluent :
</p>

  <ul class="simplelist">
   <li><span class="function"><a href="function.date.php" class="function">date()</a></span></li>
   <li><span class="methodname"><a href="intldateformatter.format.php" class="methodname">IntlDateFormatter::format()</a></span></li>
  </ul>
 </div>
 
 <div class="refsect1 description" id="refsect1-function.strftime-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="attribute"><a href="class.deprecated.php">#[\Deprecated]</a> </span><br>
   <span class="methodname"><strong>strftime</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$format</code></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.integer.php" class="type int">int</a></span></span> <code class="parameter">$timestamp</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Formate une date et/ou une heure suivant la localisation locale. Les noms
   des mois, des jours de la semaine mais aussi d&#039;autres chaînes dépendant
   de la location, respecteront la localisation courante définie par la fonction
   <span class="function"><a href="function.setlocale.php" class="function">setlocale()</a></span>.
  </p>
  <div class="warning"><strong class="warning">Avertissement</strong>
   <p class="para">
    Tous les caractères modificateurs ne sont pas toujours supportés par
    toutes les bibliothèques C. Dans ce cas, ils ne seront pas supportés
    par PHP non plus. De plus, toutes les plates-formes ne supportent pas
    les timestamps négatifs, et les dates pourraient être limitées par le
    début de l&#039;époque Unix. Cela signifie que  
    <code class="literal">%e</code>, <code class="literal">%T</code>, <code class="literal">%R</code> et <code class="literal">%D</code> 
    (et peut-être d&#039;autres) et les dates antérieures au
    <code class="literal">1er Janvier 1970</code> ne fonctionneront pas sous Windows,
    sur certaines distributions de Linux, et sur certains systèmes d&#039;exploitation.
    Pour Windows, une liste complète des options de conversion est disponible
    sur le <a href="http://msdn.microsoft.com/en-us/library/fe06s4ak.aspx" class="link external">&raquo;&nbsp;site de <abbr title="Microsoft Developer Network">MSDN</abbr></a>.
    Utiliser plutôt la méthode <span class="methodname"><a href="intldateformatter.format.php" class="methodname">IntlDateFormatter::format()</a></span>.
   </p>
  </div>
 </div>

 
 <div class="refsect1 parameters" id="refsect1-function.strftime-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">format</code></dt>
     <dd>
      <p class="para">
       <table class="doctable table">
        <caption><strong>Les caractères suivants sont reconnus dans le paramètre
         <code class="parameter">format</code></strong></caption>
        
         <thead>
          <tr>
           <th><code class="parameter">format</code></th>
           <th>Description</th>
           <th>Exemple de valeurs retournées</th>
          </tr>

         </thead>

         <tbody class="tbody">
          <tr>
           <td style="text-align: center;"><em>Jour</em></td>
           <td>---</td>
           <td>---</td>
          </tr>

          <tr>
           <td><code class="literal">%a</code></td>
           <td>Nom abrégé du jour de la semaine</td>
           <td>De <code class="literal">Sun</code> à <code class="literal">Sat</code></td>
          </tr>

          <tr>
           <td><code class="literal">%A</code></td>
           <td>Nom complet du jour de la semaine</td>
           <td>De <code class="literal">Sunday</code> à <code class="literal">Saturday</code></td>
          </tr>

          <tr>
           <td><code class="literal">%d</code></td>
           <td>Jour du mois en numérique, sur 2 chiffres (avec le zéro initial)</td>
           <td>De <code class="literal">01</code> à <code class="literal">31</code></td>
          </tr>

          <tr>
           <td><code class="literal">%e</code></td>
           <td>Jour du mois, avec un espace précédant le premier chiffre.
           L&#039;implémentation Windows est différente, voir après pour plus d&#039;informations.</td>
           <td>De <code class="literal"> 1</code> à <code class="literal">31</code></td>
          </tr>

          <tr>
           <td><code class="literal">%j</code></td>
           <td>Jour de l&#039;année, sur 3 chiffres avec un zéro initial</td>
           <td><code class="literal">001</code> à <code class="literal">366</code></td>
          </tr>

          <tr>
           <td><code class="literal">%u</code></td>
           <td>Représentation ISO-8601 du jour de la semaine</td>
           <td>De <code class="literal">1</code> (pour Lundi) à <code class="literal">7</code> (pour Dimanche)</td>
          </tr>

          <tr>
           <td><code class="literal">%w</code></td>
           <td>Représentation numérique du jour de la semaine</td>
           <td>De <code class="literal">0</code> (pour Dimanche) à <code class="literal">6</code> (pour Samedi)</td>
          </tr>

          <tr>
           <td style="text-align: center;"><em>Semaine</em></td>
           <td>---</td>
           <td>---</td>
          </tr>

          <tr>
           <td><code class="literal">%U</code></td>
           <td>Numéro de la semaine de l&#039;année donnée, en commençant par le premier
            Lundi comme première semaine</td>
           <td><code class="literal">13</code> (pour la 13ème semaine pleine de l&#039;année)</td>
          </tr>

          <tr>
           <td><code class="literal">%V</code></td>
           <td>Numéro de la semaine de l&#039;année, suivant la norme ISO-8601:1988,
            en commençant comme première semaine, la semaine de l&#039;année contenant au moins
            4 jours, et où Lundi est le début de la semaine</td>
           <td>De <code class="literal">01</code> à <code class="literal">53</code> (où 53
            compte comme semaine de chevauchement)</td>
          </tr>

          <tr>
           <td><code class="literal">%W</code></td>
           <td>Une représentation numérique de la semaine de l&#039;année, en commençant
            par le premier Lundi de la première semaine</td>
           <td><code class="literal">46</code> (pour la 46ème semaine de la semaine commençant
            par un Lundi)</td>
          </tr>

          <tr>
           <td style="text-align: center;"><em>Mois</em></td>
           <td>---</td>
           <td>---</td>
          </tr>

          <tr>
           <td><code class="literal">%b</code></td>
           <td>Nom du mois, abrégé, suivant la locale</td>
           <td>De <code class="literal">Jan</code> à <code class="literal">Dec</code></td>
          </tr>

          <tr>
           <td><code class="literal">%B</code></td>
           <td>Nom complet du mois, suivant la locale</td>
           <td>De <code class="literal">January</code> à <code class="literal">December</code></td>
          </tr>

          <tr>
           <td><code class="literal">%h</code></td>
           <td>Nom du mois abrégé, suivant la locale (alias de %b)</td>
           <td>De <code class="literal">Jan</code> à <code class="literal">Dec</code></td>
          </tr>

          <tr>
           <td><code class="literal">%m</code></td>
           <td>Mois, sur 2 chiffres</td>
           <td>De <code class="literal">01</code> (pour Janvier) à <code class="literal">12</code> (pour Décembre)</td>
          </tr>

          <tr>
           <td style="text-align: center;"><em>Année</em></td>
           <td>---</td>
           <td>---</td>
          </tr>

          <tr>
           <td><code class="literal">%C</code></td>
           <td>Représentation, sur 2 chiffres, du siècle (année divisée par 100, réduit à un entier)</td>
           <td><code class="literal">19</code> pour le 20ème siècle</td>
          </tr>

          <tr>
           <td><code class="literal">%g</code></td>
           <td>Représentation, sur 2 chiffres, de l&#039;année, compatible avec les standards ISO-8601:1988 (voir %V)</td>
           <td>Exemple : <code class="literal">09</code> pour la semaine du 6 janvier 2009</td>
          </tr>

          <tr>
           <td><code class="literal">%G</code></td>
           <td>La version complète à quatre chiffres de %g</td>
           <td>Exemple : <code class="literal">2009</code> pour la semaine du 3 janvier 2009</td>
          </tr>

          <tr>
           <td><code class="literal">%y</code></td>
           <td>L&#039;année, sur 2 chiffres</td>
           <td>Exemple : <code class="literal">09</code> pour 2009, <code class="literal">79</code> pour 1979</td>
          </tr>

          <tr>
           <td><code class="literal">%Y</code></td>
           <td>L&#039;année, sur 4 chiffres</td>
           <td>Exemple : <code class="literal">2038</code></td>
          </tr>

          <tr>
           <td style="text-align: center;"><em>Heure</em></td>
           <td>---</td>
           <td>---</td>
          </tr>

          <tr>
           <td><code class="literal">%H</code></td>
           <td>L&#039;heure, sur 2 chiffres, au format 24 heures</td>
           <td>De <code class="literal">00</code> à <code class="literal">23</code></td>
          </tr>

          <tr>
           <td><code class="literal">%k</code></td>
           <td>L&#039;heure au format 24 heures, avec un espace précédant un 
            seul chiffre</td>
           <td>De <code class="literal"> 0</code> à <code class="literal">23</code></td>
          </tr>

          <tr>
           <td><code class="literal">%I</code></td>
           <td>Heure, sur 2 chiffres, au format 12 heures</td>
           <td>De <code class="literal">01</code> à <code class="literal">12</code></td>
          </tr>

          <tr>
           <td><code class="literal">%l</code> (&#039;L&#039; minuscule)</td>
           <td>Heure, au format 12 heures, avec un espace précédant un seul chiffre</td>
           <td>De <code class="literal"> 1</code> à <code class="literal">12</code></td>
          </tr>

          <tr>
           <td><code class="literal">%M</code></td>
           <td>Minute, sur 2 chiffres</td>
           <td>De <code class="literal">00</code> à <code class="literal">59</code></td>
          </tr>

          <tr>
           <td><code class="literal">%p</code></td>
           <td>&#039;AM&#039; ou &#039;PM&#039;, en majuscule, basé sur l&#039;heure fournie</td>
           <td>
            Exemple : <code class="literal">AM</code> pour 00:31, <code class="literal">PM</code> pour 22:23.
            Le résultat exact dépend du système d&#039;exploitation, et ils peuvent également renvoyer des variantes en minuscules,
            ou des variantes avec des points (comme <code class="literal">a.m.</code>).
           </td>
          </tr>

          <tr>
           <td><code class="literal">%P</code></td>
           <td>&#039;am&#039; ou &#039;pm&#039;, en minuscule, basé sur l&#039;heure fournie</td>
           <td>
            Exemple : <code class="literal">am</code> pour 00:31, <code class="literal">pm</code> pour 22:23.
            Non pris en charge par tous les systèmes d&#039;exploitation.
           </td>
          </tr>

          <tr>
           <td><code class="literal">%r</code></td>
           <td>Identique à &quot;%I:%M:%S %p&quot;</td>
           <td>Exemple : <code class="literal">09:34:17 PM</code> pour 21:34:17</td>
          </tr>

          <tr>
           <td><code class="literal">%R</code></td>
           <td>Identique à &quot;<code class="literal">%H:%M</code>&quot;</td>
           <td>Exemple : <code class="literal">00:35</code> pour 12:35 AM, <code class="literal">16:44</code> pour 4:44 PM</td>
          </tr>

          <tr>
           <td><code class="literal">%S</code></td>
           <td>Seconde, sur 2 chiffres</td>
           <td>De <code class="literal">00</code> à <code class="literal">59</code></td>
          </tr>

          <tr>
           <td><code class="literal">%T</code></td>
           <td>Identique à &quot;<code class="literal">%H:%M:%S</code>&quot;</td>
           <td>Exemple : <code class="literal">21:34:17</code> pour 09:34:17 PM</td>
          </tr>

          <tr>
           <td><code class="literal">%X</code></td>
           <td>Représentation de l&#039;heure, basée sur la locale, sans la date</td>
           <td>Exemple : <code class="literal">03:59:16</code> ou <code class="literal">15:59:16</code></td>
          </tr>

          <tr>
           <td><code class="literal">%z</code></td>
           <td>
            Le décalage horaire. Non implémenté tel que décrit sous Windows.
            Voir plus bas pour plus d&#039;informations.</td>
           <td>Exemple : <code class="literal">-0500</code> pour l&#039;heure US de l&#039;est</td>
          </tr>

          <tr>
           <td><code class="literal">%Z</code></td>
           <td>
            L&#039;abréviation du décalage horaire. Non implémenté tel que décrit sous
            Windows. Voir plus bas pour plus d&#039;informations.
           </td>
           <td>
            Exemple : <code class="literal">EST</code> pour l&#039;heure de l&#039;Est
           </td>
          </tr>

          <tr>
           <td style="text-align: center;"><em>L&#039;heure et la date</em></td>
           <td>---</td>
           <td>---</td>
          </tr>

          <tr>
           <td><code class="literal">%c</code></td>
           <td>Date et heure préférées, basées sur la locale</td>
           <td>Exemple : <code class="literal">Tue Feb 5 00:45:10 2009</code> pour
            le 5 février 2009 à 12:45:10 AM</td>
          </tr>

          <tr>
           <td><code class="literal">%D</code></td>
           <td>Identique à &quot;<code class="literal">%m/%d/%y</code>&quot;</td>
           <td>Exemple : <code class="literal">02/05/09</code> pour le 5 février 2009</td>
          </tr>

          <tr>
           <td><code class="literal">%F</code></td>
           <td>
            Identique à &quot;<code class="literal">%Y-%m-%d</code>&quot; 
            (utilisé habituellement par les bases de données)
           </td>
           <td>Exemple : <code class="literal">2009-02-05</code> pour le 5 février 2009</td>
          </tr>

          <tr>
           <td><code class="literal">%s</code></td>
           <td>Timestamp de l&#039;époque Unix (identique à la fonction <span class="function"><a href="function.time.php" class="function">time()</a></span>)</td>
           <td>Exemple : <code class="literal">305815200</code> pour le 10 septembre 1979 08:40:00 AM</td>
          </tr>

          <tr>
           <td><code class="literal">%x</code></td>
           <td>Représentation préférée de la date, basée sur la locale, sans l&#039;heure</td>
           <td>Exemple : <code class="literal">02/05/09</code> pour le 5 février 2009</td>
          </tr>

          <tr>
           <td style="text-align: center;"><em>Divers</em></td>
           <td>---</td>
           <td>---</td>
          </tr>

          <tr>
           <td><code class="literal">%n</code></td>
           <td>Une nouvelle ligne (&quot;\n&quot;)</td>
           <td>---</td>
          </tr>

          <tr>
           <td><code class="literal">%t</code></td>
           <td>Une tabulation (&quot;\t&quot;)</td>
           <td>---</td>
          </tr>

          <tr>
           <td><code class="literal">%%</code></td>
           <td>Le caractère de pourcentage (&quot;<code class="literal">%</code>&quot;)</td>
           <td>---</td>
          </tr>

         </tbody>
        
       </table>

      </p>
      <div class="warning"><strong class="warning">Avertissement</strong>
       <p class="simpara">
        Contrairement à la norme <code class="literal">ISO-9899:1999</code>, Sun Solaris
        commence avec le Dimanche à 1. Aussi, le format <code class="literal">%u</code> 
        ne fonctionnera pas tel que décrit dans ce manuel.
       </p>
      </div>
      <div class="warning"><strong class="warning">Avertissement</strong>
       <p class="para">
        <em>Windows seulement :</em>
       </p>
       <p class="para">
        Le modificateur <code class="literal">%e</code>
        n&#039;est pas supporté sous Windows. Pour calculer la valeur, le modificateur
        <code class="literal">%#d</code> peut être utilisé à la place. L&#039;exemple d&#039;après illustre la
        manière d&#039;écrire un code cross-plateforme.
       </p>
       <p class="para">
        Les modificateurs <code class="literal">%z</code> et <code class="literal">%Z</code>
        retournent tous les deux le nom du fuseau horaire au lieu du décalage
        ou de l&#039;abréviation.
       </p>
      </div>
      <div class="warning"><strong class="warning">Avertissement</strong>
       <p class="simpara">
        <em>macOS et musl uniquement :</em> Le modificateur <code class="literal">%P</code>
        n&#039;est pas supporté par l&#039;implémentation de cette fonction sous macOS.
       </p>
      </div>
     </dd>
    
    
    
<dt><code class="parameter">timestamp</code></dt><dd><p class="para">
    Le paramètre optionnel <code class="parameter">timestamp</code> est un timestamp
    Unix de type <a href="language.types.integer.php" class="link">entier</a> qui vaut par défaut l&#039;heure courante locale si
    <code class="parameter">timestamp</code> est omis ou <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>. En d&#039;autres
    termes, il vaut par défaut la valeur de la fonction <span class="function"><a href="function.time.php" class="function">time()</a></span>.
</p></dd>
    
   </dl>
  </p>
 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-function.strftime-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Retourne une <a href="language.types.string.php" class="link">chaîne de caractères</a> formatée suivant le paramètre <code class="parameter">format</code>
   donné, en utilisant le paramètre <code class="parameter">timestamp</code> ou la date locale
   courante si aucun timestamp n&#039;est fourni. Les noms des mois, des jours de la
   semaine mais aussi d&#039;autres chaînes dépendant de la location, respecteront
   la localisation courante définie par la fonction <span class="function"><a href="function.setlocale.php" class="function">setlocale()</a></span>.
  </p>
 </div>

 
 <div class="refsect1 errors" id="refsect1-function.strftime-errors">
  <h3 class="title">Erreurs / Exceptions</h3>
  <p class="para">
Chaque appel à une fonction date/heure générera un diagnostic de type
<strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> si le fuseau horaire n&#039;est pas valide.
Voir aussi <span class="function"><a href="function.date-default-timezone-set.php" class="function">date_default_timezone_set()</a></span></p>
  <p class="para">
   Vu que la sortie dépend de la bibliothèque C sous-jacente, quelques
   spécificateurs de conversion ne sont pas supportés. Sous Windows,
   le fait de fournir un spécificateur de conversion inconnu retourne
   5 messages de niveau <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> et retournera <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>
   au final. Sous d&#039;autres systèmes d&#039;exploitation, on ne recevra aucun
   message de niveau <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> et la sortie contiendra les
   spécificateurs non convertis.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.strftime-changelog">
  <h3 class="title">Historique</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>8.0.0</td>
       <td>
        <code class="parameter">timestamp</code> est désormais nullable.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.strftime-examples">
  <h3 class="title">Exemples</h3>
  <p class="para">
   Cet exemple ne fonctionnera que si l&#039;on a les locales respectives
   installées sur le système.
   <div class="example" id="example-1">
    <p><strong>Exemple #1 Exemple avec <span class="function"><strong>strftime()</strong></span></strong></p>
    <div class="example-contents">
<div class="annotation-non-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />setlocale</span><span style="color: #007700">(</span><span style="color: #0000BB">LC_TIME</span><span style="color: #007700">, </span><span style="color: #DD0000">"C"</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%A"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">setlocale</span><span style="color: #007700">(</span><span style="color: #0000BB">LC_TIME</span><span style="color: #007700">, </span><span style="color: #DD0000">"fi_FI"</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">" in Finnish is %A,"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">setlocale</span><span style="color: #007700">(</span><span style="color: #0000BB">LC_TIME</span><span style="color: #007700">, </span><span style="color: #DD0000">"fr_FR"</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">" in French %A and"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">setlocale</span><span style="color: #007700">(</span><span style="color: #0000BB">LC_TIME</span><span style="color: #007700">, </span><span style="color: #DD0000">"de_DE"</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">" in German %A.\n"</span><span style="color: #007700">);</span></span></code></div>
    </div>

   </div>
  </p>
  <p class="para">
   <div class="example" id="example-2">
    <p><strong>Exemple #2 Exemple au format de date ISO 8601:1988</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">/*     December 2002 / January 2003<br />ISOWk  M   Tu  W   Thu F   Sa  Su<br />----- ----------------------------<br />51     16  17  18  19  20  21  22<br />52     23  24  25  26  27  28  29<br />1      30  31   1   2   3   4   5<br />2       6   7   8   9  10  11  12<br />3      13  14  15  16  17  18  19   */<br /><br />// Affiche : 12/28/2002 - %V,%G,%Y = 52,2002,2002<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"12/28/2002 - %V,%G,%Y = " </span><span style="color: #007700">. </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%V,%G,%Y"</span><span style="color: #007700">, </span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"12/28/2002"</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">// Affiche : 12/30/2002 - %V,%G,%Y = 1,2003,2002<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"12/30/2002 - %V,%G,%Y = " </span><span style="color: #007700">. </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%V,%G,%Y"</span><span style="color: #007700">, </span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"12/30/2002"</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">// Affiche : 1/3/2003 - %V,%G,%Y = 1,2003,2003<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"1/3/2003 - %V,%G,%Y = " </span><span style="color: #007700">. </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%V,%G,%Y"</span><span style="color: #007700">,</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"1/3/2003"</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">// Affiche : 1/10/2003 - %V,%G,%Y = 2,2003,2003<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"1/10/2003 - %V,%G,%Y = " </span><span style="color: #007700">. </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%V,%G,%Y"</span><span style="color: #007700">,</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"1/10/2003"</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">/*     December 2004 / January 2005<br />ISOWk  M   Tu  W   Thu F   Sa  Su<br />----- ----------------------------<br />51     13  14  15  16  17  18  19<br />52     20  21  22  23  24  25  26<br />53     27  28  29  30  31   1   2<br />1       3   4   5   6   7   8   9<br />2      10  11  12  13  14  15  16   */<br /><br />// Affiche : 12/23/2004 - %V,%G,%Y = 52,2004,2004<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"12/23/2004 - %V,%G,%Y = " </span><span style="color: #007700">. </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%V,%G,%Y"</span><span style="color: #007700">,</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"12/23/2004"</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">// Affiche : 12/31/2004 - %V,%G,%Y = 53,2004,2004<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"12/31/2004 - %V,%G,%Y = " </span><span style="color: #007700">. </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%V,%G,%Y"</span><span style="color: #007700">,</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"12/31/2004"</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">// Affiche : 1/2/2005 - %V,%G,%Y = 53,2004,2005<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"1/2/2005 - %V,%G,%Y = " </span><span style="color: #007700">. </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%V,%G,%Y"</span><span style="color: #007700">,</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"1/2/2005"</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">// Affiche : 1/3/2005 - %V,%G,%Y = 1,2005,2005<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"1/3/2005 - %V,%G,%Y = " </span><span style="color: #007700">. </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%V,%G,%Y"</span><span style="color: #007700">,</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"1/3/2005"</span><span style="color: #007700">)) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;</span></span></code></div>
    </div>

   </div>
  </p>
  <p class="para">
   <div class="example" id="example-3">
    <p><strong>Exemple #3 <code class="literal">%e</code> fonctionnant sous toute plateforme</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">// Jan 1 : résultats dans : '%e%1%' (%%, e, %%, %e, %%)<br /></span><span style="color: #0000BB">$format </span><span style="color: #007700">= </span><span style="color: #DD0000">'%%e%%%e%%'</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">// Vérifie sous Windows, pour trouver et remplacer le modificateur %e <br />// correctement<br /></span><span style="color: #007700">if (</span><span style="color: #0000BB">strtoupper</span><span style="color: #007700">(</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">PHP_OS</span><span style="color: #007700">, </span><span style="color: #0000BB">0</span><span style="color: #007700">, </span><span style="color: #0000BB">3</span><span style="color: #007700">)) == </span><span style="color: #DD0000">'WIN'</span><span style="color: #007700">) {<br />    </span><span style="color: #0000BB">$format </span><span style="color: #007700">= </span><span style="color: #0000BB">preg_replace</span><span style="color: #007700">(</span><span style="color: #DD0000">'#(?&lt;!%)((?:%%)*)%e#'</span><span style="color: #007700">, </span><span style="color: #DD0000">'\1%#d'</span><span style="color: #007700">, </span><span style="color: #0000BB">$format</span><span style="color: #007700">);<br />}<br /><br />echo </span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #0000BB">$format</span><span style="color: #007700">);</span></span></code></div>
    </div>

   </div>
  </p>
  <p class="para">
   <div class="example" id="example-4">
    <p><strong>Exemple #4 Affiche tous les formats connus ou non</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">// Décrit les formats<br /></span><span style="color: #0000BB">$strftimeFormats </span><span style="color: #007700">= array(<br />    </span><span style="color: #DD0000">'A' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Une représentation textuelle complète du jour'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'B' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Nom du mois complet, basé sur la locale'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'C' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Représentation sur 2 chiffres de l\'année (année, divisée par 100, tronquée en entier)'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'D' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Identique à "%m/%d/%y"'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'E' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'F' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Identique à "%Y-%m-%d"'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'G' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'La version complète, sur 4 chiffres de %g'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'H' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Une représentation sur 2 chiffres de l\'heure au format 24-heures'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'I' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Une représentation sur 2 chiffres de l\'heure au format 12-heures'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'J' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'K' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'L' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'M' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Une représentation sur 2 chiffres des minutes'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'N' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'O' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'P' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'"am" ou "pm" (en minuscule) basé sur l\'heure courante'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'Q' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'R' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Identique à "%H:%M"'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'S' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Une représentation sur 2 chiffres des secondes'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'T' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Identique à "%H:%M:%S"'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'U' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Numéro de la semaine pour l\'année courante, en commençant par le premier Dimanche comme première semaine'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'V'  </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'ISO-8601:1988 numéro de la semaine de l\'année courante, commençant par la première semaine de l\'année avec au moins 4 jours de semaine, avec le Lundi comme début de semaine'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'W' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Une représentation numérique de la semaine de l\'année, en commençant par le premier Lundi comme première semaine'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'X' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Représentation préférée pour l\'heure, basée sur la locale, sans la date'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'Y' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Une représentation sur 4 chiffres de l\'année'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'Z' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'L\'abréviation du décalage horaire, non fournie par %z (dépend sur système d\'exploitation)'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'a' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'L\'abréviation de la représentation textuelle du jour'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'b' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'L\'abréviation du nom du mois, basée sur la locale'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'c' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Timestamp préféré basé sur la locale'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'d' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Jour du mois sur 2 chiffres (avec le zéro initial)'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'e' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Jour du mois, avec un espace précédent un seul chiffre'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'f' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'g' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Une représentation sur 2 chiffres de l\'année au format ISO-8601:1988 (voir %V)'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'h' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Abréviation du nom du mois, basée sur la locale (alias de %b)'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'i' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'j' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Jour de l\'année, sur 3 chiffres avec zéro initial'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'k' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Heure, au format 24-heures, avec un espace précédant un seul chiffre'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'l' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Heure, au format 12-heures, avec un espace précédant un seul chiffre'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'m' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Une représentation du mois sur 2 chiffres'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'n' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Un caractère de nouvelle ligne ("\n")'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'o' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'p' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'"AM" ou "PM" (en majuscule) basé sur l\'heure courante'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'q' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'r' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Identique à "%I:%M:%S %p"'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'s' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Timestamp par rapport à l\'époque Unix'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'t' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Un caractère de tabulation ("\t")'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'u' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Représentation numérique du jour de la semaine au format ISO-8601'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'v' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'w' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Représentation numérique du jour de la semaine'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'x' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Représentation préférée de la date, basée sur la locale, sans l\'heure'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'y' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Représentation de l\'année sur 2 chiffres'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'z' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Soit le décalage horaire depuis UTC ou son abréviation (suivant le système d\'exploitation)'</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">'%' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'Un caractère pourcentage ("%")'</span><span style="color: #007700">,<br />);<br /><br /></span><span style="color: #FF8000">// Résultats<br /></span><span style="color: #0000BB">$strftimeValues </span><span style="color: #007700">= array();<br /><br /></span><span style="color: #FF8000">// Évalue les formats tout en supprimant les erreurs<br /></span><span style="color: #007700">foreach (</span><span style="color: #0000BB">$strftimeFormats </span><span style="color: #007700">as </span><span style="color: #0000BB">$format </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">$description</span><span style="color: #007700">) {<br />    if (</span><span style="color: #0000BB">false </span><span style="color: #007700">!== (</span><span style="color: #0000BB">$value </span><span style="color: #007700">= @</span><span style="color: #0000BB">strftime</span><span style="color: #007700">(</span><span style="color: #DD0000">"%</span><span style="color: #007700">{</span><span style="color: #0000BB">$format</span><span style="color: #007700">}</span><span style="color: #DD0000">"</span><span style="color: #007700">))) {<br />        </span><span style="color: #0000BB">$strftimeValues</span><span style="color: #007700">[</span><span style="color: #0000BB">$format</span><span style="color: #007700">] = </span><span style="color: #0000BB">$value</span><span style="color: #007700">;<br />    }<br />}<br /><br /></span><span style="color: #FF8000">// Trouve la valeur la plus longue<br /></span><span style="color: #0000BB">$maxValueLength </span><span style="color: #007700">= </span><span style="color: #0000BB">2 </span><span style="color: #007700">+ </span><span style="color: #0000BB">max</span><span style="color: #007700">(</span><span style="color: #0000BB">array_map</span><span style="color: #007700">(</span><span style="color: #DD0000">'strlen'</span><span style="color: #007700">, </span><span style="color: #0000BB">$strftimeValues</span><span style="color: #007700">));<br /><br /></span><span style="color: #FF8000">// Affiche tous les formats connus<br /></span><span style="color: #007700">foreach (</span><span style="color: #0000BB">$strftimeValues </span><span style="color: #007700">as </span><span style="color: #0000BB">$format </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">$value</span><span style="color: #007700">) {<br />    echo </span><span style="color: #DD0000">"Format connu : '</span><span style="color: #007700">{</span><span style="color: #0000BB">$format</span><span style="color: #007700">}</span><span style="color: #DD0000">' = "</span><span style="color: #007700">, </span><span style="color: #0000BB">str_pad</span><span style="color: #007700">(</span><span style="color: #DD0000">"'</span><span style="color: #007700">{</span><span style="color: #0000BB">$value</span><span style="color: #007700">}</span><span style="color: #DD0000">'"</span><span style="color: #007700">, </span><span style="color: #0000BB">$maxValueLength</span><span style="color: #007700">), </span><span style="color: #DD0000">" ( </span><span style="color: #007700">{</span><span style="color: #0000BB">$strftimeFormats</span><span style="color: #007700">[</span><span style="color: #0000BB">$format</span><span style="color: #007700">]}</span><span style="color: #DD0000"> )\n"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #FF8000">// Affiche tous les formats non connus<br /></span><span style="color: #007700">foreach (</span><span style="color: #0000BB">array_diff_key</span><span style="color: #007700">(</span><span style="color: #0000BB">$strftimeFormats</span><span style="color: #007700">, </span><span style="color: #0000BB">$strftimeValues</span><span style="color: #007700">) as </span><span style="color: #0000BB">$format </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">$description</span><span style="color: #007700">) {<br />    echo </span><span style="color: #DD0000">"Format inconnu : '</span><span style="color: #007700">{</span><span style="color: #0000BB">$format</span><span style="color: #007700">}</span><span style="color: #DD0000">'   "</span><span style="color: #007700">, </span><span style="color: #0000BB">str_pad</span><span style="color: #007700">(</span><span style="color: #DD0000">' '</span><span style="color: #007700">, </span><span style="color: #0000BB">$maxValueLength</span><span style="color: #007700">), (</span><span style="color: #0000BB">$description </span><span style="color: #007700">? </span><span style="color: #DD0000">" ( </span><span style="color: #007700">{</span><span style="color: #0000BB">$description</span><span style="color: #007700">}</span><span style="color: #DD0000"> )" </span><span style="color: #007700">: </span><span style="color: #DD0000">''</span><span style="color: #007700">), </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />}</span></span></code></div>
    </div>

    <div class="example-contents"><p>Résultat de l&#039;exemple ci-dessus est similaire à :</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">Format connu : &#039;A&#039; = &#039;Friday&#039;            ( Une représentation textuelle complète du jour )
Format connu : &#039;B&#039; = &#039;December&#039;          ( Nom du mois complet, basé sur la locale )
Format connu : &#039;H&#039; = &#039;11&#039;                ( Une représentation sur 2 chiffres de l&#039;heure au format 24-heures )
Format connu : &#039;I&#039; = &#039;11&#039;                ( Une représentation sur 2 chiffres de l&#039;heure au format 12-heures )
Format connu : &#039;M&#039; = &#039;24&#039;                ( Une représentation sur 2 chiffres des minutes )
Format connu : &#039;S&#039; = &#039;44&#039;                ( Une représentation sur 2 chiffres des secondes )
Format connu : &#039;U&#039; = &#039;48&#039;                ( Numéro de la semaine pour l&#039;année courante, en commençant par le premier Dimanche comme première semaine )
Format connu : &#039;W&#039; = &#039;48&#039;                ( Une représentation numérique de la semaine de l&#039;année, en commençant par le premier Lundi comme première semaine )
Format connu : &#039;X&#039; = &#039;11:24:44&#039;          ( Représentation préférée pour l&#039;heure, basée sur la locale, sans la date )
Format connu : &#039;Y&#039; = &#039;2010&#039;              ( Une représentation sur 4 chiffres de l&#039;année )
Format connu : &#039;Z&#039; = &#039;GMT Standard Time&#039; ( L&#039;abréviation du décalage horaire, non fournie par %z (dépend sur système d&#039;exploitation )
Format connu : &#039;a&#039; = &#039;Fri&#039;               ( L&#039;abréviation de la représentation textuelle du jour )
Format connu : &#039;b&#039; = &#039;Dec&#039;               ( L&#039;abréviation du nom du mois, basée sur la locale )
Format connu : &#039;c&#039; = &#039;12/03/10 11:24:44&#039; ( Timestamp préféré basé sur la locale )
Format connu : &#039;d&#039; = &#039;03&#039;                ( Jour du mois sur 2 chiffres (avec le zéro initial) )
Format connu : &#039;j&#039; = &#039;337&#039;               ( Jour de l&#039;année, sur 3 chiffres avec zéro initial )
Format connu : &#039;m&#039; = &#039;12&#039;                ( Une représentation du mois sur 2 chiffres )
Format connu : &#039;p&#039; = &#039;AM&#039;                ( &quot;AM&quot; ou &quot;PM&quot; (en majuscule) basé sur l&#039;heure courante )
Format connu : &#039;w&#039; = &#039;5&#039;                 ( Représentation numérique du jour de la semaine )
Format connu : &#039;x&#039; = &#039;12/03/10&#039;          ( Représentation préférée de la date, basée sur la locale, sans l&#039;heure )
Format connu : &#039;y&#039; = &#039;10&#039;                ( Représentation de l&#039;année sur 2 chiffres )
Format connu : &#039;z&#039; = &#039;GMT Standard Time&#039; ( Soit le décalage horaire depuis UTC ou son abréviation (suivant le système d&#039;exploitation) )
Format connu : &#039;%&#039; = &#039;%&#039;                 ( Un caractère pourcentage (&quot;%&quot;) )
Format inconnu : &#039;C&#039;                       ( Représentation sur 2 chiffres de l&#039;année (année, divisée par 100, tronquée en entier) )
Format inconnu : &#039;D&#039;                       ( Identique à &quot;%m/%d/%y&quot; )
Format inconnu : &#039;E&#039;
Format inconnu : &#039;F&#039;                       ( Identique à &quot;%Y-%m-%d&quot; )
Format inconnu : &#039;G&#039;                       ( La version complète, sur 4 chiffres de %g )
Format inconnu : &#039;J&#039;
Format inconnu : &#039;K&#039;
Format inconnu : &#039;L&#039;
Format inconnu : &#039;N&#039;
Format inconnu : &#039;O&#039;
Format inconnu : &#039;P&#039;                       ( &quot;am&quot; ou &quot;pm&quot; (en minuscule) basé sur l&#039;heure courante )
Format inconnu : &#039;Q&#039;
Format inconnu : &#039;R&#039;                       ( Identique à &quot;%H:%M&quot; )
Format inconnu : &#039;T&#039;                       ( Identique à &quot;%H:%M:%S&quot; )
Format inconnu : &#039;V&#039;                       ( ISO-8601:1988 numéro de la semaine de l&#039;année courante, commençant par la première semaine de l&#039;année avec au moins 4 jours de semaine, avec le Lundi comme début de semaine )
Format inconnu : &#039;e&#039;                       ( Jour du mois, avec un espace précédent un seul chiffre )
Format inconnu : &#039;f&#039;
Format inconnu : &#039;g&#039;                       ( Une représentation sur 2 chiffres de l&#039;année au format ISO-8601:1988 (voir %V) )
Format inconnu : &#039;h&#039;                       ( Abréviation du nom du mois, basée sur la locale (alias de %b) )
Format inconnu : &#039;i&#039;
Format inconnu : &#039;k&#039;                       ( Heure, au format 24-heures, avec un espace précédant un seul chiffre )
Format inconnu : &#039;l&#039;                       ( Heure, au format 12-heures, avec un espace précédant un seul chiffre )
Format inconnu : &#039;n&#039;                       ( Un caractère de nouvelle ligne (&quot;\n&quot;) )
Format inconnu : &#039;o&#039;
Format inconnu : &#039;q&#039;
Format inconnu : &#039;r&#039;                       ( Identique à &quot;%I:%M:%S %p&quot; )
Format inconnu : &#039;s&#039;                       ( Timestamp par rapport à l&#039;époque Unix )
Format inconnu : &#039;t&#039;                       ( Un caractère de tabulation (&quot;\t&quot;) )
Format inconnu : &#039;u&#039;                       ( Représentation numérique du jour de la semaine au format ISO-8601 )
Format inconnu : &#039;v&#039;</pre>
</div>
    </div>
   </div>
  </p>
 </div>

 
 <div class="refsect1 notes" id="refsect1-function.strftime-notes">
  <h3 class="title">Notes</h3>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <span class="simpara">
    <code class="literal">%G</code> et <code class="literal">%V</code>, qui sont basées
    sur la semaine <code class="literal">ISO 8601:1988</code>, peuvent conduire 
    à des résultats inattendus (bien que corrects) si le
    système de numérotation n&#039;est pas connu. Voir l&#039;exemple
    <code class="literal">%V</code> de cette page.
   </span>
  </p></blockquote>
 </div>

 
 <div class="refsect1 seealso" id="refsect1-function.strftime-seealso">
  <h3 class="title">Voir aussi</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="intldateformatter.format.php" class="methodname" rel="rdfs-seeAlso">IntlDateFormatter::format()</a> - Formate la date et l'heure sous forme de cha&icirc;ne</span></li>
    <li><span class="methodname"><a href="datetime.format.php" class="methodname" rel="rdfs-seeAlso">DateTimeInterface::format()</a> - Retourne une date format&eacute;e suivant le format fourni</span></li>
    <li><a href="http://strftime.net/" class="link external">&raquo;&nbsp;Outil de formatage strftime() en ligne</a></li>
    <li><span class="function"><a href="function.setlocale.php" class="function" rel="rdfs-seeAlso">setlocale()</a> - Modifie les informations de localisation</span></li>
    <li><span class="function"><a href="function.mktime.php" class="function" rel="rdfs-seeAlso">mktime()</a> - Retourne l'horodatage UNIX d'une date</span></li>
    <li><span class="function"><a href="function.strptime.php" class="function" rel="rdfs-seeAlso">strptime()</a> - Analyse une date g&eacute;n&eacute;r&eacute;e par strftime</span></li>
    <li><span class="function"><a href="function.gmstrftime.php" class="function" rel="rdfs-seeAlso">gmstrftime()</a> - Formate une date/heure GMT/TUC en fonction de la configuration locale</span></li>
    <li><a href="http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html" class="link external">&raquo;&nbsp;groupe de spécifications de <span class="function"><strong>strftime()</strong></span></a></li>
   </ul>
  </p>
 </div>

</div><?php manual_footer($setup); ?>