derek           Sun Apr  3 15:36:42 2005 EDT

  Modified files:              
    /phpdoc/en/reference/datetime/functions     localtime.xml 
  Log:
  Adding example and additional note regarding decimal values of day and month 
titles
  
http://cvs.php.net/diff.php/phpdoc/en/reference/datetime/functions/localtime.xml?r1=1.3&r2=1.4&ty=u
Index: phpdoc/en/reference/datetime/functions/localtime.xml
diff -u phpdoc/en/reference/datetime/functions/localtime.xml:1.3 
phpdoc/en/reference/datetime/functions/localtime.xml:1.4
--- phpdoc/en/reference/datetime/functions/localtime.xml:1.3    Sat Mar 29 
10:15:45 2003
+++ phpdoc/en/reference/datetime/functions/localtime.xml        Sun Apr  3 
15:36:42 2005
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
 <!-- splitted from ./en/functions/datetime.xml, last change in rev 1.10 -->
   <refentry id="function.localtime">
    <refnamediv>
@@ -79,6 +79,56 @@
       </listitem>
      </itemizedlist>
     </para>
+    <note>
+     <simpara>
+      Months are from 0 (Jan) to 11 (Dec) and days of the week are from 0 
(Sun) to 6 (Sat).
+     </simpara>
+    </note>
+    <para>
+     <example>
+      <title><function>time</function> example</title>
+      <programlisting role="php">
+<![CDATA[
+<?php
+$localtime = localtime();
+$localtime_assoc = localtime(time(), 1);
+print_r($localtime);
+print_r($localtime_assoc);
+?>
+]]>
+      </programlisting>
+      &example.outputs.similar;
+      <screen>
+<![CDATA[
+Array
+(
+    [0] => 24
+    [1] => 3
+    [2] => 19
+    [3] => 3
+    [4] => 3
+    [5] => 105
+    [6] => 0
+    [7] => 92
+    [9] => 1
+)
+
+Array
+(
+    [tm_sec] => 24
+    [tm_min] => 3
+    [tm_hour] => 19
+    [tm_mday] => 3
+    [tm_mon] => 3
+    [tm_year] => 105
+    [tm_wday] => 0
+    [tm_yday] => 92
+    [tm_isdst] => 1
+)
+]]>
+      </screen>
+     </example>
+    </para>
    </refsect1>
   </refentry>
 

Reply via email to