PHP easter_days() function

PHP easter_date() function
PHP frenchtojd() function

In this article, you will learn how to get the easter days after 21 March which is the Easter Day of that year.

Note: 21st March is called Equinox. So, the Sunday after the full moon that appears after or on the Spring Equinox is the date of Easter Day.

What is the syntax of the easter_days() function in PHP?

easter_days(year,method);
ParameterDescription
yearThe year to get the Easter Day in – Required
methodCalendar to use – Optional
PHP easter_days() method

Examples of the easter_days() function

Example 1. In this example, we will get the number of days after 21 March that is the Easter Day for different years.

<?php
echo "Easter Day is ". easter_days() . " days after 21 March;
echo "Easter Day is ". easter_days(2021) . " days after 21 March;
echo "Easter Day is ". easter_days(2040) . " days after 21 March;
?>
PHP easter_date() function
PHP frenchtojd() function
en English
X
Scroll to Top