Using PHP's easter_date Function to Get Easter Midnight Unix Timestamp
This article explains PHP's easter_date function, which returns the Unix timestamp for midnight on Easter Sunday of a specified year (1970‑2037), details its year parameter, return value, and provides sample code demonstrating its usage.
The PHP function easter_date() returns the Unix timestamp for midnight on Easter Sunday of a given year, supporting years between 1970 and 2037.
Parameter
year – an integer representing the year (1970‑2037).
Return value
The Unix timestamp corresponding to Easter Sunday midnight for the specified year.
Example
<?php
echo date("M-d-Y", easter_date(1999)); // Apr-04-1999
echo date("M-d-Y", easter_date(2000)); // Apr-23-2000
echo date("M-d-Y", easter_date(2001)); // Apr-15-2001
?>Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Laravel Tech Community
Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
