<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>The DatePeriod class</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="dateinterval.format.html">DateInterval::format</a></div> <div class="next" style="text-align: right; float: right;"><a href="dateperiod.construct.html">DatePeriod::__construct</a></div> <div class="up"><a href="book.datetime.html">Date/Time</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="class.dateperiod" class="reference"> <h1 class="title">The DatePeriod class</h1> <div class="partintro"><p class="verinfo">(PHP 5 >= 5.3.0)</p> <div class="section" id="dateperiod.intro"> <h2 class="title">Introduction</h2> <p class="para"> Represents a date period. </p> <p class="para"> A date period allows iteration over a set of dates and times, recurring at regular intervals, over a given period. </p> </div> <div class="section" id="dateperiod.synopsis"> <h2 class="title">Class synopsis</h2> <div class="classsynopsis"> <div class="ooclass"></div> <div class="classsynopsisinfo"> <span class="ooclass"> <strong class="classname">DatePeriod</strong> </span> <span class="oointerface">implements <span class="interfacename"><a href="class.traversable.html" class="interfacename">Traversable</a></span> </span> {</div> <div class="classsynopsisinfo classsynopsisinfo_comment">/* Constants */</div> <div class="fieldsynopsis"> <span class="modifier">const</span> <span class="type">integer</span> <var class="fieldsynopsis_varname"><a href="class.dateperiod.html#dateperiod.constants.exclude-start-date"><var class="varname">EXCLUDE_START_DATE</var></a></var> <span class="initializer"> = 1</span> ;</div> <div class="classsynopsisinfo classsynopsisinfo_comment">/* Methods */</div> <div class="constructorsynopsis dc-description"> <span class="modifier">public</span> <span class="methodname"><a href="dateperiod.construct.html" class="methodname">__construct</a></span> ( <span class="methodparam"><span class="type"><a href="class.datetime.html" class="type DateTime">DateTime</a></span> <code class="parameter">$start</code></span> , <span class="methodparam"><span class="type"><a href="class.dateinterval.html" class="type DateInterval">DateInterval</a></span> <code class="parameter">$interval</code></span> , <span class="methodparam"><span class="type">int</span> <code class="parameter">$recurrences</code></span> [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$options</code></span> ] )</div> <div class="constructorsynopsis dc-description"> <span class="modifier">public</span> <span class="methodname"><a href="dateperiod.construct.html" class="methodname">__construct</a></span> ( <span class="methodparam"><span class="type"><a href="class.datetime.html" class="type DateTime">DateTime</a></span> <code class="parameter">$start</code></span> , <span class="methodparam"><span class="type"><a href="class.dateinterval.html" class="type DateInterval">DateInterval</a></span> <code class="parameter">$interval</code></span> , <span class="methodparam"><span class="type"><a href="class.datetime.html" class="type DateTime">DateTime</a></span> <code class="parameter">$end</code></span> [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$options</code></span> ] )</div> <div class="constructorsynopsis dc-description"> <span class="modifier">public</span> <span class="methodname"><a href="dateperiod.construct.html" class="methodname">__construct</a></span> ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$isostr</code></span> [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$options</code></span> ] )</div> }</div> </div> <div class="section" id="dateperiod.constants"> <h2 class="title">Predefined Constants</h2> <dl> <dt id="dateperiod.constants.exclude-start-date"> <span class="term"><strong><code>DatePeriod::EXCLUDE_START_DATE</code></strong></span> <dd> <p class="para">Exclude start date, used in <span class="function"><a href="dateperiod.construct.html" class="function">DatePeriod::__construct()</a></span>.</p> </dd> </dt> </dl> </div> </div> <h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="dateperiod.construct.html">DatePeriod::__construct</a> — Creates a new DatePeriod object</li></ul> </div> <hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="dateinterval.format.html">DateInterval::format</a></div> <div class="next" style="text-align: right; float: right;"><a href="dateperiod.construct.html">DatePeriod::__construct</a></div> <div class="up"><a href="book.datetime.html">Date/Time</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>