typo in the example output. add also strtotime(+1 week) to the example

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@226175 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Nuno Lopes 2007-01-01 10:34:56 +00:00
parent 4677bf9a18
commit 94f320d2db

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- $Revision: 1.9 $ -->
<refentry id="function.time">
<refnamediv>
<refname>time</refname>
@ -30,6 +30,8 @@ $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";
// or using strtotime():
echo 'Next Week: '. date('Y-m-d', strtotime('+1 week')) ."\n";
?>
]]>
</programlisting>
@ -37,7 +39,8 @@ echo 'Next Week: '. date('Y-m-d', $nextWeek) ."\n";
<screen>
<![CDATA[
Now: 2005-03-30
Next Week: 2005-04-07
Next Week: 2005-04-06
Next Week: 2005-04-06
]]>
</screen>
</example>