Location: PHPKode > scripts > Nearest weekday > nearest-weekday/example.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Movable Christian Feast Days calculator</title>

<h1>Movable Feast Days </h1>

	 * Example file where you can see the special day of year
	 * Author: ABEL Daniel/John Borda


$ytoday = date("Y");
echo $ytoday.'</h2>';
// Epiphany (6th Jan)
$epiphany = mktime(0,0,0,01,06,$ytoday);
$episun = new nearestweekday();

$sd = new DatesSpeciales();
// Ascension
$Asc = strtotime($sd->assension());
$Ascsun = new nearestweekday();

// Corpus Christi
$cchristi = strtotime($sd->CorpusChristi());
$ccsun = new nearestweekday();

echo '<p>';
echo 'Epiphany falls on: '.date('d M Y', $epiphany).' and is celebrated on Sunday: '.date('d M Y', strtotime($episun->nrweekday($epiphany))) ;
echo '<br>Ash Wednesday falls on: '.date('d M Y', strtotime($sd->cendresMercredi()));
echo '<br>Good Friday falls on: '.date('d M Y', strtotime($sd->vendrediSaint()));
echo '<br>Easter Sunday falls on: '.date('d M Y', strtotime($sd->paquesDimanche()));
echo '<br>Easter Monday falls on: '.date('d M Y', strtotime($sd->paquesLundi()));
echo '<br>Ascension falls on: '.date('d M Y', strtotime($sd->assension())).' and is celebrated on Sunday: '.date('d M Y', strtotime($Ascsun->nrweekday($Asc))) ;
echo '<br>Pentecost Sunday falls on: '.date('d M Y', strtotime($sd->pentecoteDimanche()));
echo '<br>Corpus Christi falls on: '.date('d M Y', strtotime($sd->CorpusChristi())).' and is celebrated on Sunday: '.date('d M Y', strtotime($ccsun->nrweekday($cchristi))) ;

<p class="small">Original program by Daniel Abel, see: <a href="http://www.phpclasses.org/browse/package/4220.html">http://www.phpclasses.org/browse/package/4220.html</a> modified by <a href="http://www.bordaline.co.uk/">John Borda</a> to include nearest Sundays and Corpus Christi. </p>
Return current item: Nearest weekday