Conversation
marc-mabe
force-pushed
the
fix/easter-date-windows-upper-bound
branch
from
September 25, 2026 19:09
3b8ab94 to
dcbdd5c
Compare
Girgias
reviewed
Sep 26, 2026
Girgias
left a comment
Member
There was a problem hiding this comment.
Seems reasonable, can you fix the nits? :)
marc-mabe
force-pushed
the
fix/easter-date-windows-upper-bound
branch
from
September 27, 2026 18:21
dcbdd5c to
db2fa13
Compare
Girgias
reviewed
Sep 27, 2026
| echo $year, ': '; | ||
| try { | ||
| echo date('Y-m-d', easter_date($year)), PHP_EOL; | ||
| } catch (ValueError $e) { |
Member
There was a problem hiding this comment.
Suggested change
| } catch (ValueError $e) { | |
| } catch (Throwable $e) { |
| echo $year, ': '; | ||
| try { | ||
| echo date('Y-m-d', easter_date($year)), "\n"; | ||
| } catch (ValueError $e) { |
Member
There was a problem hiding this comment.
Suggested change
| } catch (ValueError $e) { | |
| } catch (Throwable $e) { |
Comment on lines
+22
to
+25
| } catch (ValueError $ex) { | ||
| echo "{$ex->getMessage()}\n"; | ||
| } | ||
| ?> |
Member
There was a problem hiding this comment.
Suggested change
| } catch (ValueError $ex) { | |
| echo "{$ex->getMessage()}\n"; | |
| } | |
| ?> | |
| } catch (Throwable $e) { | |
| echo $e::class, ': ', $e->getMessage(), PHP_EOL; | |
| } | |
| ?> |
Depending on the year, easter_date() reported the range of easter_days() or only one of its bounds. Determine the supported range once and report it in a single error message.
mktime() on Windows only goes up to the year 3000 and returns -1 beyond that, so easter_date() returned -1 instead of throwing for the years 3001 to 2000000000. Limit the year to 3000 on Windows.
marc-mabe
force-pushed
the
fix/easter-date-windows-upper-bound
branch
from
September 28, 2026 05:46
db2fa13 to
798cce7
Compare
Contributor
Author
|
@Girgias Now, it should have been addressed correctly |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixed #23915