dams            Fri Jul 20 14:28:44 2001 EDT

  Modified files:              
    /phpdoc/fr/functions        datetime.xml 
  Log:
  Updated examples, plus typo
  
Index: phpdoc/fr/functions/datetime.xml
diff -u phpdoc/fr/functions/datetime.xml:1.21 phpdoc/fr/functions/datetime.xml:1.22
--- phpdoc/fr/functions/datetime.xml:1.21       Sat Jul  7 18:22:04 2001
+++ phpdoc/fr/functions/datetime.xml    Fri Jul 20 14:28:44 2001
@@ -234,8 +234,10 @@
     <example>
      <title>Exemple avec <function>date</function></title>
      <programlisting role="php">
-print (date("l dS of F Y h:i:s A"));
-print ("July 1, 2000 is on a " . date("l", mktime(0,0,0,7,1,2000)));
+&lt;?php
+  print (date("l dS of F Y h:i:s A"));
+  print ("July 1, 2000 is on a " . date("l", mktime(0,0,0,7,1,2000)));
+?&gt;
      </programlisting>
     </example>
    </para>
@@ -249,9 +251,9 @@
      </title>
      <programlisting role="php">
 &lt;?php
-$tomorrow  = mktime(0,0,0,date("m")  ,date("d") + 1,date("Y")    );
-$lastmonth = mktime(0,0,0,date("m")-1,date("d")    ,date("Y")    );
-$nextyear  = mktime(0,0,0,date("m"),  date("d")    ,date("Y") + 1);
+  $tomorrow  = mktime(0,0,0,date("m")  ,date("d") + 1,date("Y")    );
+  $lastmonth = mktime(0,0,0,date("m")-1,date("d")    ,date("Y")    );
+  $nextyear  = mktime(0,0,0,date("m"),  date("d")    ,date("Y") + 1);
 ?&gt;
      </programlisting>
     </example>
@@ -272,15 +274,15 @@
      <programlisting role="php">
 &lt;?php
 /* Aujourd'hui, le 12 Mars 2001, 10:16:18 pm */
-$aujourdhui = date("F j, Y, g:i a");                 // March 12, 2001, 10:16 pm
-$aujourdhui = date("m.d.y");                         // 03.12.01
-$aujourdhui = date("j, g, Y");                       // 12, 3, 2001
-$aujourdhui = date("Ymd");                           // 20010312
-$aujourdhui = date('h-i-s, j-m-y, it is w Day z ');  // 05-16-17, 12-03-01, 1631 1618 
6 Monpm01
-$aujourdhui = date('\C\'\e\s\t\ \l\e\ jS \j\o\u\r\.');   // C'est le 12th jour.
-$aujourdhui = date("D M j G:i:s T Y");               // Mon Mar 12 15:16:08 MST 2001
-$aujourdhui = date('H:m:s \m \e\s\t\ \l\e\ \m\o\i\s');     // 17:03:18 m est le mois
-$aujourdhui = date("H:i:s");                         // 10:16:18
+  $aujourdhui = date("F j, Y, g:i a");                 // March 12, 2001, 10:16 pm
+  $aujourdhui = date("m.d.y");                         // 03.12.01
+  $aujourdhui = date("j, m, Y");                       // 12, 3, 2001
+  $aujourdhui = date("Ymd");                           // 20010312
+  $aujourdhui = date('h-i-s, j-m-y, it is w Day z ');  // 05-16-17, 12-03-01, 1631 
+1618 6 Monpm01
+  $aujourdhui = date('\C\'\e\s\t\ \l\e\ jS \j\o\u\r\.');   // C'est le 12th jour.
+  $aujourdhui = date("D M j G:i:s T Y");               // Mon Mar 12 15:16:08 MST 2001
+  $aujourdhui = date('H:m:s \m \e\s\t\ \l\e\ \m\o\i\s');     // 17:03:18 m est le mois
+  $aujourdhui = date("H:i:s");                         // 10:16:18
 // notation fran&ccedil;aise
 $aujourdhui = date("d/m/y");                         // 12/03/01
 $aujourdhui = date("d/m/Y");                         // 12/03/2001
@@ -375,11 +377,11 @@
     <title>Exemple avec <function>getdate</function></title>
     <programlisting role="php">
 &lt;?php
-$aujourdhui = getdate();
-$mois = $aujourdhui['month'];
-$mjour = $aujourdhui['mday'];
-$annee = $aujourdhui['year'];
-echo "$mjour/$mois/$annee";
+  $aujourdhui = getdate();
+  $mois = $aujourdhui['month'];
+  $mjour = $aujourdhui['mday'];
+  $annee = $aujourdhui['year'];
+  echo "$mjour/$mois/$annee";
 ?&gt;
     </programlisting>
    </example>
@@ -453,8 +455,8 @@
      <title>Exemple avec <function>gmdate</function></title>
      <programlisting role="php">
 &lt;?php
-echo date ("M d Y H:i:s", mktime (0,0,0,1,1,1998));
-echo gmdate ("M d Y H:i:s", mktime (0,0,0,1,1,1998));
+  echo date("M d Y H:i:s", mktime (0,0,0,1,1,1998));
+  echo gmdate("M d Y H:i:s", mktime (0,0,0,1,1,1998));
 ?&gt;
      </programlisting>
     </example>
@@ -523,9 +525,9 @@
      <title>Exemple avec <function>gmstrftime</function></title>
      <programlisting role="php">
 &lt;?php
-setlocale ('LC_TIME', 'en_US');
-echo strftime ("%b %d %Y %H:%M:%S", mktime (20,0,0,12,31,98))."\n";
-echo gmstrftime ("%b %d %Y %H:%M:%S", mktime (20,0,0,12,31,98))."\n";
+  setlocale('LC_TIME', 'en_US');
+  echo strftime("%b %d %Y %H:%M:%S", mktime (20,0,0,12,31,98))."\n";
+  echo gmstrftime("%b %d %Y %H:%M:%S", mktime (20,0,0,12,31,98))."\n";
 ?&gt;
      </programlisting>
     </example>
@@ -648,17 +650,17 @@
      <title>Exemple avec <function>microtime</function></title>
      <programlisting role="php">
 &lt;?php
-function getmicrotime(){
+  function getmicrotime(){
     list($usec, $sec) = explode(" ",microtime());
     return ((float)$usec + (float)$sec);
-}
-$time_start = getmicrotime();
-for ($i=0; $i < 1000; $i++){
+  }
+  $time_start = getmicrotime();
+  for ($i=0; $i < 1000; $i++){
     //ne rien faire, pendant un millier de fois...
-}
-$time_end = getmicrotime();
-$time = $time_end - $time_start;
-echo "Rien fait durant $time secondes";
+  }
+  $time_end = getmicrotime();
+  $time = $time_end - $time_start;
+  echo "Rien fait durant $time secondes";
 ?&gt;
      </programlisting>
     </example>
@@ -730,10 +732,10 @@
      <title>Exemple <function>mktime</function></title>
      <programlisting role="php">
 &lt;?php
-echo date ("M-d-Y", mktime (0,0,0,12,32,1997));
-echo date ("M-d-Y", mktime (0,0,0,13,1,1997));
-echo date ("M-d-Y", mktime (0,0,0,1,1,1998));
-echo date ("M-d-Y", mktime (0,0,0,1,1,98));
+  echo date("M-d-Y", mktime (0,0,0,12,32,1997));
+  echo date("M-d-Y", mktime (0,0,0,13,1,1997));
+  echo date("M-d-Y", mktime (0,0,0,1,1,1998));
+  echo date("M-d-Y", mktime (0,0,0,1,1,98));
 ?&gt;
      </programlisting>
     </example>
@@ -753,10 +755,10 @@
      <title>Dernier jour du mois</title>
      <programlisting role="php">
 &lt;?php
-$lastday = mktime (0,0,0,3,0,2000);
-echo strftime ("Le dernier jour de F&eacute;vrier 2000 est: %d", $lastday);
-$lastday = mktime (0,0,0,4,-31,2000);
-echo strftime ("Le dernier jour de F&eacute;vrier 2000 est: %d", $lastday);
+  $lastday = mktime (0,0,0,3,0,2000);
+  echo strftime ("Le dernier jour de F&eacute;vrier 2000 est: %d", $lastday);
+  $lastday = mktime (0,0,0,4,-31,2000);
+  echo strftime ("Le dernier jour de F&eacute;vrier 2000 est: %d", $lastday);
 ?&gt;
      </programlisting>
     </example>
@@ -993,14 +995,14 @@
      <title>Exemple <function>strftime</function></title>
      <programlisting role="php">
 &lt;?php
-setlocale ("LC_TIME", "C");
-print(strftime("%A en Finlandais est "));
-setlocale ("LC_TIME", "fi");
-print(strftime("%A, en Fran&ccedil;ais "));
-setlocale ("LC_TIME", "fr");
-print(strftime("%A est en Allemand "));
-setlocale ("LC_TIME", "de");
-print(strftime("%A.\n"));
+  setlocale ("LC_TIME", "C");
+  print(strftime("%A en Finlandais est "));
+  setlocale ("LC_TIME", "fi");
+  print(strftime("%A, en Fran&ccedil;ais "));
+  setlocale ("LC_TIME", "fr");
+  print(strftime("%A est en Allemand "));
+  setlocale ("LC_TIME", "de");
+  print(strftime("%A.\n"));
 ?&gt;
      </programlisting>
     </example>
@@ -1068,11 +1070,11 @@
      <programlisting role="php">
 &lt;?php
 // l'exemple n'est pas traduit, car cela ne fonctionne qu'en anglais
-echo strtotime("now") . "\n";
-echo strtotime("10 September 2000") . "\n";
-echo strtotime("+1 day") . "\n";
-echo strtotime("+1 week") . "\n";
-echo strtotime("+1 week 2 days 4 hours 2 seconds")."\n";
+  echo strtotime("now") . "\n";
+  echo strtotime("10 September 2000") . "\n";
+  echo strtotime("+1 day") . "\n";
+  echo strtotime("+1 week") . "\n";
+  echo strtotime("+1 week 2 days 4 hours 2 seconds")."\n";
 ?&gt;
      </programlisting>
     </example>


Reply via email to