Our source is open
The syntax highlighted source is automatically generated by PHP from
the plaintext script.
If you're interested in what's behind the several functions we
used, you can always take a look at the source of the following files:
Of course, if you want to see the source
of this page, we have it available.
You can also browse the SVN repository for this website on
svn.php.net.
Source of: /manual/en/class.dateinterval.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.datetime.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'class.dateinterval.php',
1 => 'DateInterval',
),
'up' =>
array (
0 => 'book.datetime.php',
1 => 'Date and Time',
),
'prev' =>
array (
0 => 'datetimezone.listidentifiers.php',
1 => 'DateTimeZone::listIdentifiers',
),
'next' =>
array (
0 => 'dateinterval.construct.php',
1 => 'DateInterval::__construct',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div>
<h1 class="title">The DateInterval class</h1>
<div class="partintro">
<div id="dateinterval.intro" class="section">
<h2 class="title">Introduction</h2>
<p class="para">
Representation of date interval.
</p>
</div>
<div id="dateinterval.synopsis" class="section">
<h2 class="title">Class synopsis</h2>
<div class="classsynopsis">
<div class="ooclass"><b class="classname">DateInterval</b></div>
<div class="classsynopsisinfo">
<span class="ooclass">
<b class="classname">DateInterval</b>
</span>
{</div>
<div class="classsynopsisinfo classsynopsisinfo_comment">/* Methods */</div>
<div class="methodsynopsis dc-description">
<span class="methodname"><a href="dateinterval.construct.php" class="function">__construct</a></span>
( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$interval_spec</tt></span>
)</div>
<div class="methodsynopsis dc-description">
<span class="modifier">public</span> <span class="modifier">static</span> <span class="type">DateInterval</span> <span class="methodname"><a href="dateinterval.createfromdatestring.php" class="function">createFromDateString</a></span>
( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$time</tt></span>
)</div>
<div class="methodsynopsis dc-description">
<span class="modifier">public</span> <span class="type">string</span> <span class="methodname"><a href="dateinterval.format.php" class="function">format</a></span>
( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$format</tt></span>
)</div>
}</div>
</div>
</div>
<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="dateinterval.construct.php">DateInterval::__construct</a> — Creates new DateInterval object</li><li><a href="dateinterval.createfromdatestring.php">DateInterval::createFromDateString</a> — Sets up a DateInterval from the relative parts of the string</li><li><a href="dateinterval.format.php">DateInterval::format</a> — Formats the interval</li></ul>
</div>
<?php manual_footer(); ?>