Add microseconds support to DateInterval

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@342541 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jiří Pudil 2017-06-05 08:22:07 +00:00
parent faac297a11
commit e542303a31
2 changed files with 69 additions and 0 deletions

View file

@ -68,6 +68,11 @@
<type>integer</type>
<varname linkend="dateinterval.props.s">s</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<type>float</type>
<varname linkend="dateinterval.props.f">f</varname>
</fieldsynopsis>
<fieldsynopsis>
<modifier>public</modifier>
<type>integer</type>
@ -148,6 +153,14 @@
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="dateinterval.props.f">
<term><varname>f</varname></term>
<listitem>
<para>
Number of microseconds, as a fraction of a second.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="dateinterval.props.invert">
<term><varname>invert</varname></term>
<listitem>
@ -177,6 +190,28 @@
</variablelist>
</section>
<section role="changelog" xml:id="dateinterval.changelog"><!-- {{{ -->
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>7.1.0</entry>
<entry>The <varname>f</varname> property was added.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</section><!-- }}} -->
</partintro>
&reference.datetime.entities.dateinterval;

View file

@ -112,6 +112,17 @@
<entry>Seconds, numeric</entry>
<entry><literal>1</literal>, <literal>3</literal>, <literal>57</literal></entry>
</row>
<row>
<entry><literal>F</literal></entry>
<entry>Microseconds, numeric, at least 6 digits with leading
0</entry>
<entry><literal>007701</literal>, <literal>052738</literal>, <literal>428291</literal></entry>
</row>
<row>
<entry><literal>f</literal></entry>
<entry>Microseconds, numeric</entry>
<entry><literal>7701</literal>, <literal>52738</literal>, <literal>428291</literal></entry>
</row>
<row>
<entry><literal>R</literal></entry>
<entry>Sign "<literal>-</literal>" when negative, "<literal>+</literal>" when positive</entry>
@ -152,6 +163,29 @@
</note>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>7.1.0</entry>
<entry>The <literal>F</literal> and <literal>f</literal> format
characters were added.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>