-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ext/calendar: Allow easter_date to process years after 2037 on 64bit systems #11862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
4a15b78
to
f2828e1
Compare
f2828e1
to
456301e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nits, and this also needs an entry in UPGRADING
Added a check to easter_date to allow it to run with years past 2037 when on a 64bit platform.
456301e
to
c5a4c31
Compare
@Girgias I fixed the cs and added an entry to UPGRADING! Is there a tool which shows cs violations in this project, or is it more a learning thing to get it right? |
I also submitted PR's to update the English and German docs: doc_en: php/doc-en#2643 |
No we don't have any such tools, I think some people have tried but it was too difficult to setup :/ |
- Calendar | ||
. easter_date() now supports years from 1970 to 2,000,000,000 on 64-bit systems, | ||
previously it only supported years in the range from 1970 to 2037. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We list these in alphabetical order, but that can be fixed as a follow-up for now
…1862) Added a check to easter_date to allow it to run with years past 2037 when on a 64bit platform.
Until now, easter_date always threw an error if executed with a year after 2037. This was done to prevent an integer overflow with Unix timestamps in the years after 2038 from appearing. (Y2K38 bug)
Since the overflow does not happen with signed 64-bit integers, I added a check to allow easter_date to run on 64bit systems with years after 2037.