Get the number of days after March 21, that the Easter Day is/was for different years in PHP

Description

The following code shows how to get the number of days after March 21, that the Easter Day is/was for different years.

Example


/* w w  w .jav a 2 s. c  o m*/
<?php
   echo "Easter Day is ". easter_days() . " days after March 21 this year.<br />";
   echo "Easter Day was ". easter_days(1990) . " days after March 21 in 1990.<br />";
   echo "Easter Day was ". easter_days(1342) . " days after March 21 in 1342.<br />";
   echo "Easter Day will be ". easter_days(2050) . " days after March 21 in 2050.";
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Data Types »




Array
Array Associative
Array Util
ArrayObject
Data Types
Date
Date Format
DateTime
Number
String
String Escape
String Filter
String HTML
String Type
Timezone