easter_days() function in PHP


The eastern_days() function returns the number of days after March 21, on which Easter falls for a specified year.

Syntax

eastern_days(year, method)

Parameters

  • year − An year between 1970 and 2037. The default is the current year, local time

  • method − Calculate easter dates based on other calendars.

Return

The easter_days() function returns the easter date as a unix timestamp.

Example

The following is an example −

Live Demo

<?php
   echo "Easter Day was ". easter_days(2017) . " days after March 21 in the year 2017";
?>

Output

Easter Day was 26 days after March 21 in the year 2017

Updated on: 30-Jul-2019

27 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements