mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-21 03:18:55 +00:00

-- Provided by anonymous 33805 (sebastiankuhlmann@web.de) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@331466 c90b9560-bf6c-de11-be94-00142212c4b1
205 lines
5.9 KiB
XML
205 lines
5.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<phpdoc:classref xml:id="class.dateinterval" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
|
|
|
|
<title>The DateInterval class</title>
|
|
<titleabbrev>DateInterval</titleabbrev>
|
|
|
|
<partintro>
|
|
|
|
<!-- {{{ DateInterval intro -->
|
|
<section xml:id="dateinterval.intro">
|
|
&reftitle.intro;
|
|
<para>
|
|
Represents a date interval.
|
|
</para>
|
|
<para>
|
|
A date interval stores either a fixed amount of time (in years, months,
|
|
days, hours etc) or a relative time string in the format that
|
|
<classname>DateTime</classname>'s constructor supports.
|
|
</para>
|
|
</section>
|
|
<!-- }}} -->
|
|
|
|
<section xml:id="dateinterval.synopsis">
|
|
&reftitle.classsynopsis;
|
|
|
|
<!-- {{{ Synopsis -->
|
|
<classsynopsis>
|
|
<ooclass><classname>DateInterval</classname></ooclass>
|
|
|
|
<!-- {{{ Class synopsis -->
|
|
<classsynopsisinfo>
|
|
<ooclass>
|
|
<classname>DateInterval</classname>
|
|
</ooclass>
|
|
</classsynopsisinfo>
|
|
<!-- }}} -->
|
|
|
|
<classsynopsisinfo role="comment">&Properties;</classsynopsisinfo>
|
|
<fieldsynopsis>
|
|
<modifier>public</modifier>
|
|
<type>integer</type>
|
|
<varname linkend="dateinterval.props.y">y</varname>
|
|
</fieldsynopsis>
|
|
<fieldsynopsis>
|
|
<modifier>public</modifier>
|
|
<type>integer</type>
|
|
<varname linkend="dateinterval.props.m">m</varname>
|
|
</fieldsynopsis>
|
|
<fieldsynopsis>
|
|
<modifier>public</modifier>
|
|
<type>integer</type>
|
|
<varname linkend="dateinterval.props.d">d</varname>
|
|
</fieldsynopsis>
|
|
<fieldsynopsis>
|
|
<modifier>public</modifier>
|
|
<type>integer</type>
|
|
<varname linkend="dateinterval.props.h">h</varname>
|
|
</fieldsynopsis>
|
|
<fieldsynopsis>
|
|
<modifier>public</modifier>
|
|
<type>integer</type>
|
|
<varname linkend="dateinterval.props.i">i</varname>
|
|
</fieldsynopsis>
|
|
<fieldsynopsis>
|
|
<modifier>public</modifier>
|
|
<type>integer</type>
|
|
<varname linkend="dateinterval.props.s">s</varname>
|
|
</fieldsynopsis>
|
|
<fieldsynopsis>
|
|
<modifier>public</modifier>
|
|
<type>integer</type>
|
|
<varname linkend="dateinterval.props.invert">invert</varname>
|
|
</fieldsynopsis>
|
|
<fieldsynopsis>
|
|
<modifier>public</modifier>
|
|
<type>mixed</type>
|
|
<varname linkend="dateinterval.props.days">days</varname>
|
|
</fieldsynopsis>
|
|
|
|
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
|
|
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.dateinterval')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[not(@role='procedural')])">
|
|
<xi:fallback />
|
|
</xi:include>
|
|
<!--
|
|
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.dateinterval')/db:refentry/db:refsect1[@role='description']/descendant::db:destructorsynopsis[not(@role='procedural')])">
|
|
<xi:fallback />
|
|
</xi:include>
|
|
-->
|
|
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.dateinterval')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])">
|
|
<xi:fallback />
|
|
</xi:include>
|
|
|
|
</classsynopsis>
|
|
<!-- }}} -->
|
|
|
|
</section>
|
|
|
|
<section xml:id="dateinterval.props">
|
|
&reftitle.properties;
|
|
<variablelist>
|
|
<varlistentry xml:id="dateinterval.props.y">
|
|
<term><varname>y</varname></term>
|
|
<listitem>
|
|
<para>
|
|
Number of years.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="dateinterval.props.m">
|
|
<term><varname>m</varname></term>
|
|
<listitem>
|
|
<para>
|
|
Number of months.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="dateinterval.props.d">
|
|
<term><varname>d</varname></term>
|
|
<listitem>
|
|
<para>
|
|
Number of days.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="dateinterval.props.h">
|
|
<term><varname>h</varname></term>
|
|
<listitem>
|
|
<para>
|
|
Number of hours.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="dateinterval.props.i">
|
|
<term><varname>i</varname></term>
|
|
<listitem>
|
|
<para>
|
|
Number of minutes.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="dateinterval.props.s">
|
|
<term><varname>s</varname></term>
|
|
<listitem>
|
|
<para>
|
|
Number of seconds.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="dateinterval.props.invert">
|
|
<term><varname>invert</varname></term>
|
|
<listitem>
|
|
<para>
|
|
Is <literal>1</literal> if the interval
|
|
represents a negative time period and
|
|
<literal>0</literal> otherwise.
|
|
See <methodname>DateInterval::format</methodname>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="dateinterval.props.days">
|
|
<term><varname>days</varname></term>
|
|
<listitem>
|
|
<para>
|
|
If the DateInterval object was created by
|
|
<function>DateTime::diff</function>, then this is the total number of
|
|
days between the start and end dates. Otherwise,
|
|
<varname>days</varname> will be &false;.
|
|
</para>
|
|
<para>
|
|
Before PHP 5.4.20/5.5.4 instead of &false; you will receive -99999 upon
|
|
accessing the property.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</section>
|
|
|
|
</partintro>
|
|
|
|
&reference.datetime.entities.dateinterval;
|
|
|
|
</phpdoc:classref>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|