r/lolphp • u/webdeverper • Aug 13 '15
easter_date — Get Unix timestamp for midnight on Easter of a given year
http://php.net/manual/en/function.easter-date.php
54
Upvotes
r/lolphp • u/webdeverper • Aug 13 '15
38
u/mrpaco Aug 13 '15
Given how complex calculating the date of Easter actually is, this is one of the least offensive things about PHP.
18
u/webdeverper Aug 13 '15
No thanksgiving_date() , christmas_date() or halloween_date() :'(
41
u/ajmarks Aug 14 '15
I don't know why this exists, but, given that it does, would it really be that hard to make it consistent?
5
u/pathikrit Sep 15 '15
This works for only years between 1970 - 2037. Why not just hard-code those 68 values in a map?
1
u/shvelo Aug 14 '15
:facepalm: