svn: /phpdoc/en/trunk/reference/datetime/functions/ date-parse.xml

From: Date: Fri, 07 Aug 2015 21:03:06 +0000
Subject: svn: /phpdoc/en/trunk/reference/datetime/functions/ date-parse.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-13516@lists.php.net to get a copy of this message
cmb Fri, 07 Aug 2015 21:03:06 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=337325 Log: documented parsing of relative formats (fixes #70209) Bug: https://bugs.php.net/70209 (Open) date_parse does not parse all formats strtotime does Changed paths: U phpdoc/en/trunk/reference/datetime/functions/date-parse.xml Modified: phpdoc/en/trunk/reference/datetime/functions/date-parse.xml =================================================================== --- phpdoc/en/trunk/reference/datetime/functions/date-parse.xml 2015-08-07 14:43:20 UTC (rev 337324) +++ phpdoc/en/trunk/reference/datetime/functions/date-parse.xml 2015-08-07 21:03:06 UTC (rev 337325) @@ -79,6 +79,56 @@ </screen> </example> </para> + <para> + <link linkend="datetime.formats.relative">Relative formats</link> do not + influence the values parsed from absolute formats, but are parsed into the + "relative" element. + <example> + <title><function>date_parse</function> with relative formats</title> + <programlisting role="php"> +<![CDATA[ +<?php +print_r(date_parse("2006-12-12 10:00:00.5 +1 week +1 hour")); +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +Array +( + [year] => 2006 + [month] => 12 + [day] => 12 + [hour] => 10 + [minute] => 0 + [second] => 0 + [fraction] => 0.5 + [warning_count] => 0 + [warnings] => Array + ( + ) + + [error_count] => 0 + [errors] => Array + ( + ) + + [is_localtime] => + [relative] => Array + ( + [year] => 0 + [month] => 0 + [day] => 7 + [hour] => 1 + [minute] => 0 + [second] => 0 + ) + +)]]> + </screen> + </example> + </para> </refsect1> <refsect1 role="seealso">

« previous php.doc.cvs (#13516) next »