Tutorials Point


  Learning PHP
  Advanced PHP
  PHP Function Reference
  PHP Useful Resources
  Selected Reading

Copyright © 2014 by tutorialspoint



  Home     References     Discussion Forums     About TP  

PHP Function easter_date()


previous

Advertisements

Syntax

easter_date ( [$year] );

Definition and Usage

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

Paramters

ParameterDescription
yearOptional. 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 />";
echo date("M-d-Y", easter_date(2010));        
echo "<br />";
echo date("M-d-Y", easter_date(2007)); 
?> 

This will produce following result:

Apr-21-2019
Apr-04-2010
Apr-08-2007

previous Printer Friendly

Advertisements


  

Advertisements