<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.calendar.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.easter-days.php',
    1 => 'easter_days',
    2 => 'Get number of days after March 21 on which Easter falls for a given year',
  ),
  'up' => 
  array (
    0 => 'ref.calendar.php',
    1 => 'Функції Календаря',
  ),
  'prev' => 
  array (
    0 => 'function.easter-date.php',
    1 => 'easter_date',
  ),
  'next' => 
  array (
    0 => 'function.frenchtojd.php',
    1 => 'frenchtojd',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/calendar/functions/easter-days.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.easter-days" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">easter_days</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">easter_days</span> &mdash; <span class="dc-title">Get number of days after March 21 on which Easter falls for a given year</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.easter-days-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>easter_days</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.integer.php" class="type int">int</a></span></span> <code class="parameter">$year</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$mode</code><span class="initializer"> = <strong><code><a href="calendar.constants.php#constant.cal-easter-default">CAL_EASTER_DEFAULT</a></code></strong></span></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

  <p class="para rdfs-comment">
   Returns the number of days after March 21 on which Easter falls
   for a given year. If no year is specified, the current year is
   assumed.
  </p>
  <p class="para">
   This function can be used instead of
   <span class="function"><a href="function.easter-date.php" class="function">easter_date()</a></span> to calculate Easter for years
   which fall outside the range of Unix timestamps (i.e. before 1970
   or after 2037).
  </p>
  <p class="para">
   The date of Easter Day was defined by the Council of Nicaea in
   AD325 as the Sunday after the first full moon which falls on or
   after the Spring Equinox.  The Equinox is assumed to always fall
   on 21st March, so the calculation reduces to determining the date
   of the full moon and the date of the following Sunday.  The
   algorithm used here was introduced around the year 532 by
   Dionysius Exiguus.  Under the Julian Calendar (for years before
   1753) a simple 19-year cycle is used to track the phases of the
   Moon.  Under the Gregorian Calendar (for years after 1753 -
   devised by Clavius and Lilius, and introduced by Pope Gregory
   XIII in October 1582, and into Britain and its then colonies in
   September 1752) two correction factors are added to make the
   cycle more accurate.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.easter-days-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">year</code></dt>
     <dd>
      <p class="para">
       The year as a positive number. If omitted or <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>, defaults to the
       current year according to the local time.
      </p>
     </dd>
      
    
     <dt><code class="parameter">mode</code></dt>
     <dd>
      <p class="para">
       Allows Easter dates to be calculated based
       on the Gregorian calendar during the years 1582 - 1752 when set to
       <strong><code><a href="calendar.constants.php#constant.cal-easter-roman">CAL_EASTER_ROMAN</a></code></strong>. See the <a href="calendar.constants.php" class="link">calendar constants</a> for more valid
       constants.      
       </p>
     </dd>
      
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.easter-days-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   The number of days after March 21st that the Easter Sunday
   is in the given <code class="parameter">year</code>.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.easter-days-changelog">
  <h3 class="title">Журнал змін</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Версія</th>
      <th>Опис</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">year</code> is nullable now.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.easter-days-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Приклад #1 <span class="function"><strong>easter_days()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">easter_days</span><span style="color: #007700">(</span><span style="color: #0000BB">1999</span><span style="color: #007700">);        </span><span style="color: #FF8000">// 14, i.e. April 4<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">easter_days</span><span style="color: #007700">(</span><span style="color: #0000BB">1492</span><span style="color: #007700">);        </span><span style="color: #FF8000">// 32, i.e. April 22<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">easter_days</span><span style="color: #007700">(</span><span style="color: #0000BB">1913</span><span style="color: #007700">);        </span><span style="color: #FF8000">//  2, i.e. March 23<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.easter-days-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.easter-date.php" class="function" rel="rdfs-seeAlso">easter_date()</a> - Get Unix timestamp for local midnight on Easter of a given year</span></li>
   </ul>
  </p>
 </div>

</div><?php manual_footer($setup); ?>