|
|
PHP (angielski akronim rekurencyjny, którego rozwinięcie to PHP Hypertext Preprocessor), pierwotnie nazwany Personal
Home Page - skryptowy język programowania, służący przede wszystkim do tworzenia dynamicznych stron WWW i wykonywany w
tym przypadku po stronie serwera, z możliwością zagnieżdżania w HTML (bądź XHTML). PHP jest podobny w założeniach do
dużo starszego mechanizmu SSI (Server Side Includes), jednak jest w stosunku do SSI nieporównanie bardziej rozbudowany.
Udostępniany jest na zasadach licencji open-source. Jego składnia bazuje na językach C, Java i Perl.
SQL (ang. Structured Query Language) to strukturalny język zapytań używany do tworzenia, modyfikowania baz danych oraz
do umieszczania i pobierania danych z baz danych.
Język SQL jest językiem deklaratywnym. Decyzję o sposobie przechowywania i pobrania danych pozostawia się systemowi
zarządzania bazą danych DBMS.
Jest to język programowania opracowany w latach siedemdziesiątych w firmie IBM. Stał się on standardem w komunikacji z
serwerami relacyjnych baz danych. Wiele współczesnych systemów relacyjnych baz danych używa do komunikacji z
użytkownikiem SQL, dlatego mówi się, że korzystanie z relacyjnych baz danych, to korzystanie z SQL-a.
Apache jest otwartym serwerem HTTP dostępnym dla wielu systemów operacyjnych (m.in. UNIX, GNU/Linux, BSD,
Microsoft Windows). Po angielsku słowo Apache wymawia się epaczi, co brzmi tak samo jak a patchy (server), co było
określeniem tego serwera we wczesnym stadium jego rozwoju w 1995 roku, kiedy był on głównie zbiorem poprawek (patch)
nałożonych na serwer HTTP o nazwie NCSA.
Apache jest najszerzej stosowanym serwerem HTTP w Internecie. W maju 2003 jego udział wśród serwerów wynosił 62%. W
połączeniu z interpreterem języka skryptowego PHP i bazą danych MySQL, Apache stanowi jedno z najczęściej spotykanych
środowisk w firmach oferujących miejsce na serwerach sieciowych.
|
easter_days
(PHP 3 >= 3.0.9, PHP 4, PHP 5) easter_days -- Get
number of days after March 21 on which Easter falls for a given
year
Descriptionint easter_days (
[int year [, int method]] )
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.
Since PHP 4.3.0, the year
parameter is optional and defaults to the current year
according to the localtime if omitted.
The method parameter was also
introduced in PHP 4.3.0 and allows to calculate easter dates
based on the Gregorian calendar during the years 1582 - 1752
when set to CAL_EASTER_ROMAN.
See the calendar
constants for more valid constants.
This function can be used instead of easter_date() to calculate Easter for years
which fall outside the range of Unix timestamps (i.e. before
1970 or after 2037).
Przykład 1. easter_days() example
<?php
echo easter_days(1999); // 14, i.e. April 4 echo easter_days(1492); // 32, i.e. April 22
echo easter_days(1913); // 2, i.e. March 23
?> |
|
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.
(The code is based on a C program by Simon Kershaw,
<webmaster at ely.anglican dot org>)
See also easter_date().
|