Clarify "days" property (closes bug #54495).

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@319638 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Daniel Convissor 2011-11-21 15:36:19 +00:00
parent 1da6663976
commit 94adebe079
2 changed files with 22 additions and 14 deletions

View file

@ -159,8 +159,9 @@
<term><varname>days</varname></term>
<listitem>
<para>
Total number of days the interval spans. If this is unknown,
<varname>days</varname> will be &false;.
Total number of days between the starting and ending dates
in a <function>DateTime::diff</function> calculation.
<varname>days</varname> will be &false; in other circumstances.
</para>
</listitem>
</varlistentry>

View file

@ -130,7 +130,7 @@
<?php
$interval = new DateInterval('P2Y4DT6H8M');
print_r($interval);
var_dump($interval);
?>
]]>
@ -138,17 +138,24 @@ print_r($interval);
&example.outputs;
<screen role="php">
<![CDATA[
DateInterval Object
(
[y] => 2
[m] => 0
[d] => 4
[h] => 6
[i] => 8
[s] => 0
[invert] => 0
[days] => 0
)
object(DateInterval)#1 (8) {
["y"]=>
int(2)
["m"]=>
int(0)
["d"]=>
int(4)
["h"]=>
int(6)
["i"]=>
int(8)
["s"]=>
int(0)
["invert"]=>
int(0)
["days"]=>
bool(false)
}
]]>
</screen>
</example>