PHP - Function easter_date()


Advertisements


Syntax

easter_date ( [$year] );

Definition and Usage

This function returns the Unix timestamp corresponding to midnight on Easter of the given year.

Parameters

Sr.No Parameter & Description
1

year(Optional)

The year as a number between 1970 an 2037

Return Value

Unix timestamp corresponding to midnight on Easter of the given year.

Example

Try out following example −

<?php
   echo date("M-d-Y", easter_date(2019));
   echo "<br />"; 
?> 

This will produce the following result −

Apr-21-2019

php_function_reference.htm

Advertisements