PHP

PHP Menu

PHP

easter_date() Function - Definition, Syntax, Parameters, Examples

Definition

The easter_date() function returns the Unix timestamp for midnight on Easter of the given year.

Syntax

easter_date(year)

Parameters

Parameter Description
year Optional. Specifies a year between 1970 and 2037. Default is the current year, local time.

Example

<?php

echo easter_date() . "<br>";
echo date("M-d-Y",easter_date()) . "<br>";
echo date("M-d-Y",easter_date(2022));

Introduction

PHP Basics

PHP Advance

PHP OOP

PHP Functions and Methods