svn: /phpdoc/fa/trunk/reference/datetime/datetime/ diff.xml

From: Date: Mon, 19 Apr 2010 17:13:37 +0000
Subject: svn: /phpdoc/fa/trunk/reference/datetime/datetime/ diff.xml
Groups: php.doc.fa 
Request: Send a blank email to doc-fa+get-699@lists.php.net to get a copy of this message
psalehpoor Mon, 19 Apr 2010 17:13:37 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=298183 Log: updated Changed paths: U phpdoc/fa/trunk/reference/datetime/datetime/diff.xml Modified: phpdoc/fa/trunk/reference/datetime/datetime/diff.xml =================================================================== --- phpdoc/fa/trunk/reference/datetime/datetime/diff.xml 2010-04-19 17:10:12 UTC (rev 298182) +++ phpdoc/fa/trunk/reference/datetime/datetime/diff.xml 2010-04-19 17:13:37 UTC (rev 298183) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 291313 Maintainer: pedram Status: ready --> +<!-- EN-Revision: 298179 Maintainer: pedram Status: ready --> <!-- Reviewed: yes --> <!-- $Revision$ --> @@ -51,7 +51,43 @@ تفاوت بین دو تاریخ. </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>مثال <function>date_diff</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$first = new DateTime('2009-10-11'); +$second = new DateTime('2009-10-13'); +$interval = $first->diff($second); +echo $interval->format('%R%d days'); + +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ ++2 days +]]> + </screen> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>DateInterval::format</function></member> + <member><function>DateTime::add</function></member> + <member><function>DateTime::sub</function></member> + </simplelist> + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file

« previous php.doc.fa (#699) next »