П О Р Т А Л                            
С Е Т Е В Ы Х                          
П Р О Е К Т О В                        
  
Поиск по сайту:
                                                 
Главная

О проекте

Web-мастеру
     HTML & JavaScript
     SSI
     Perl
     PHP
     XML & XSLT
     Unix Shell

MySQL

Безопасность

Хостинг

Другое








Самое читаемое:

Учебник PHP - "Для Чайника".
Просмотров 6396 раз(а).

Иллюстрированный самоучитель по созданию сайтов.
Просмотров 8498 раз(а).

Учебник HTML.
Просмотров 5109 раз(а).

Руководство по PHP5.
Просмотров 2279 раз(а).

Хостинг через призму DNS.
Просмотров 7426 раз(а).

Подборка текстов стандартных документов.
Просмотров 101 раз(а).

Учебник PHP - Самоучитель
Просмотров 5401 раз(а).

Документация на MySQL (учебник & справочное руководство)
Просмотров 11594 раз(а).

Внешние атаки...
Просмотров 7844 раз(а).

Учебник PHP.
Просмотров 4511 раз(а).

SSI в примерах.
Просмотров 1368 раз(а).



 
 
| Добавить в избранное | Сделать стартовой | Помощь





Руководство по PHP
Пред. След.

easter_date

(PHP 3 >= 3.0.9, PHP 4, PHP 5)

easter_date --  Get Unix timestamp for midnight on Easter of a given year

Description

int easter_date ( [int year] )

Returns the Unix timestamp corresponding to midnight on Easter of the given year.

Since PHP 4.3.0, the year parameter is optional and defaults to the current year according to the localtime if omitted.

Пример 1. easter_date() example

<?php

echo date("M-d-Y", easter_date(1999));        // Apr-04-1999
echo date("M-d-Y", easter_date(2000));        // Apr-23-2000
echo date("M-d-Y", easter_date(2001));        // Apr-15-2001

?>

Внимание

This function will generate a warning if the year is outside of the range for Unix timestamps (i.e. before 1970 or after 2037).

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 easter_days() for calculating Easter before 1970 or after 2037.



Если Вы не нашли что искали, то рекомендую воспользоваться поиском по сайту:
 





Copyright © 2005-2016 Project.Net.Ru