sean            Wed Mar 30 23:03:21 2005 EDT

  Modified files:              
    /phpdoc/en/reference/datetime/functions     time.xml 
  Log:
  added example
  
http://cvs.php.net/diff.php/phpdoc/en/reference/datetime/functions/time.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc/en/reference/datetime/functions/time.xml
diff -u phpdoc/en/reference/datetime/functions/time.xml:1.4 
phpdoc/en/reference/datetime/functions/time.xml:1.5
--- phpdoc/en/reference/datetime/functions/time.xml:1.4 Sat Dec 20 23:21:43 2003
+++ phpdoc/en/reference/datetime/functions/time.xml     Wed Mar 30 23:03:19 2005
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
 <!-- splitted from ./en/functions/datetime.xml, last change in rev 1.2 -->
   <refentry id="function.time">
    <refnamediv>
@@ -17,6 +17,28 @@
      the Unix Epoch (January 1 1970 00:00:00 GMT).
     </para>
     <para>
+     <example>
+      <title><function>time</function> example</title>
+      <programlisting role="php">
+<![CDATA[
+<?php
+$nextWeek = time() + (7 * 24 * 60 * 60);
+                   // 7 days; 24 hours; 60 mins; 60secs
+echo 'Now:       '. date('Y-m-d') ."\n";
+echo 'Next Week: '. date('Y-m-d', $nextWeek) ."\n";
+?>
+]]>
+      </programlisting>
+      &example.outputs.similar;
+      <screen>
+<![CDATA[
+Now:       2005-03-30
+Next Week: 2005-04-07
+]]>
+      </screen>
+     </example>
+    </para>          
+    <para>
      See also <function>date</function> and <function>microtime</function>.
     </para>
    </refsect1>

Reply via email to