function getOrthodoxEaster($date)
{
/*
Takes any Gregorian date and returns the Gregorian
date of Orthodox Easter for that year.
*/
$year = date("Y", $date);
$r1 = $year % 19;
$r2 = $year % 4;
$r3 = $year % 7;
$ra = 19 * $r1 + 16;
$r4 = $ra % 30;
$rb = 2 * $r2 + 4 * $r3 + 6 * $r4;
$r5 = $rb % 7;
$rc = $r4 + $r5;
//Orthodox Easter for this year will fall $rc days after April 3
return strtotime("3 April $year + $rc days");
}
?>
Warning: pg_pconnect(): Unable to connect to PostgreSQL server: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: the database system is starting up in /var/www/ordo/data_cal.php on line 34
Fatal error: Uncaught Error: No PostgreSQL connection opened yet in /var/www/ordo/data_cal.php:35
Stack trace:
#0 /var/www/ordo/data_cal.php(35): pg_exec()
#1 /var/www/ordo/ordo_day_anyday.php(158): include('...')
#2 {main}
thrown in /var/www/ordo/data_cal.php on line 35