Sophie

Sophie

distrib > PLD > ac > amd64 > media > dist > by-pkgid > dd8ef74e7a184506d40e4328053fb785 > files > 700

php-manual-ro-20051028-1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML
><HEAD
><TITLE
>easter_date</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Manual PHP"
HREF="index.html"><LINK
REL="UP"
TITLE="Calendar Functions"
HREF="ref.calendar.html"><LINK
REL="PREVIOUS"
TITLE="cal_to_jd"
HREF="function.cal-to-jd.html"><LINK
REL="NEXT"
TITLE="easter_days"
HREF="function.easter-days.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-2"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Manual PHP</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.cal-to-jd.html"
ACCESSKEY="P"
>Înapoi</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.easter-days.html"
ACCESSKEY="N"
>Înainte</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.easter-date"
></A
>easter_date</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN9061"
></A
><P
>    (PHP 3&#62;= 3.0.9, PHP 4 , PHP 5)</P
>easter_date&nbsp;--&nbsp;
     Get Unix timestamp for midnight on Easter of a given year
    </DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN9064"
></A
><H2
>Description</H2
>int <B
CLASS="methodname"
>easter_date</B
> ( [int year])<BR
></BR
><P
>&#13;     Returns the Unix timestamp corresponding to midnight on Easter of
     the given year.
    </P
><P
>&#13;     Since <VAR
CLASS="literal"
>PHP</VAR
> 4.3.0, the <VAR
CLASS="parameter"
>year</VAR
>
     parameter is optional and defaults to the current year according to the
     localtime if omitted.
    </P
><P
>&#13;     <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN9077"
></A
><P
><B
>Exemplu 1. <B
CLASS="function"
>easter_date()</B
> example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><font color="#000000">
<font color="#0000BB">&lt;?php<br /><br /></font><font color="#007700">echo </font><font color="#0000BB">date</font><font color="#007700">(</font><font color="#DD0000">"M-d-Y"</font><font color="#007700">, </font><font color="#0000BB">easter_date</font><font color="#007700">(</font><font color="#0000BB">1999</font><font color="#007700">));&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#FF8000">// Apr-04-1999<br /></font><font color="#007700">echo </font><font color="#0000BB">date</font><font color="#007700">(</font><font color="#DD0000">"M-d-Y"</font><font color="#007700">, </font><font color="#0000BB">easter_date</font><font color="#007700">(</font><font color="#0000BB">2000</font><font color="#007700">));&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#FF8000">// Apr-23-2000<br /></font><font color="#007700">echo </font><font color="#0000BB">date</font><font color="#007700">(</font><font color="#DD0000">"M-d-Y"</font><font color="#007700">, </font><font color="#0000BB">easter_date</font><font color="#007700">(</font><font color="#0000BB">2001</font><font color="#007700">));&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#FF8000">// Apr-15-2001<br /><br /></font><font color="#0000BB">?&gt;</font>
</font>
</code></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
    </P
><DIV
CLASS="warning"
><P
></P
><TABLE
CLASS="warning"
BORDER="1"
WIDTH="100%"
><TR
><TD
ALIGN="CENTER"
><B
>Avertisment</B
></TD
></TR
><TR
><TD
ALIGN="LEFT"
><P
>&#13;      This function will generate a warning if the year is outside
      of the range for Unix timestamps (i.e. before 1970 or after 2037).
     </P
></TD
></TR
></TABLE
></DIV
><P
>&#13;     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
><P
>&#13;     (The code is based on a C program by Simon Kershaw,
     &#60;webmaster at ely.anglican dot org&#62;)
    </P
><P
>&#13;     See <A
HREF="function.easter-days.html"
><B
CLASS="function"
>easter_days()</B
></A
> for calculating Easter
     before 1970 or after 2037.
    </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.cal-to-jd.html"
ACCESSKEY="P"
>Înapoi</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Acas&#227;</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.easter-days.html"
ACCESSKEY="N"
>Înainte</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>cal_to_jd</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.calendar.html"
ACCESSKEY="U"
>Sus</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>easter_days</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>