easter_date(): the Unix timestamp for midnight on Easter Sunday for a specified year

Get the Easter Sunday timestamp

easter_date() returns a Unix timestamp for Easter Sunday for a supported year.

$timestamp = easter_date(2027);
echo date('Y-m-d', $timestamp);
$time_stamp=easter_date(2025);
echo "Easter date is :".date('m-d-Y',$time_stamp);
The output is here
Easter date is :04-20-2025
If year is not given the easter date of current year is returned.
$time_stamp=easter_date();
echo "Easter date is :".date('m-d-Y',$time_stamp);
Output is here
Easter date is :04-05-2026
We can get unix timestamp of Easter day corresponding to midnight on Easter of the given year by using easter_date() function.
Here is the syntax
easter_date(?int $year = null, int $mode = CAL_EASTER_DEFAULT): int
The function returns a Unix timestamp for local midnight on Easter Sunday. On current PHP versions, out-of-range years raise ValueError.
Timezone note: easter_date() relies on the system C library and its TZ environment setting. If you need PHP-timezone-aware date arithmetic, use easter_days() with DateTimeImmutable.


Information about available Calendars
Calendar Functions


Subscribe to our YouTube Channel here



plus2net.com











PHP video Tutorials
✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer