Speed up development with full-stack environments for every branch.

Learn More

How to calculate midnight on Easter of a given year [calendar and php-calendar]

48 Runs 60 Views 14 Copies
Saved

Saved

gtsolutions 373

gtsolutions
published 4 years ago

<?php

/**
 * PHP Calendar module
 * calculate the Unix timestamp corresponding to midnight on Easter of the given year.
 */

echo '<center>';
foreach (range(2010, 2015) as $year) {
    echo '<br /><div style="background-color:green;padding:10px;color:#fff;font-size:16px;width:400px;">';
    echo 'In '.$year.' <b>Easter</b> was/is on <b>'.date("d M", easter_date($year)).'</b><br />';
    echo '</div>';
}
echo '</center>';
?>
Please login/signup to get access to the terminal.

Your session has timed out.

Dismiss (the page may not function properly).