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

Learn More

How to calculate the number of days after March 21 on which Easter falls for a given year. [php calendar]

3 Runs 22 Views 0 Copies
Saved

Saved

gtsolutions 373

gtsolutions
published 4 years ago

<?php

/**
 * PHP Calendar module
 * calculate the number of days after March 21 on which Easter falls for a given year.
 */

echo '<center>';
foreach (range(2008, 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 <b>'.easter_days($year).' days</b> after 21 March<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).