Skip to content

Conversation

@devnexen
Copy link
Member

@devnexen devnexen commented May 2, 2025

… nan

@devnexen devnexen marked this pull request as ready for review May 2, 2025 11:57
@devnexen devnexen requested a review from derickr as a code owner May 2, 2025 11:57
@devnexen devnexen linked an issue May 2, 2025 that may be closed by this pull request
N -= floor(N / 24) * 24;
}
if (N > 24 || N < 0) {
if (N > 24 || N < 0 || !zend_finite(N)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's also possible to do it like this: if (!(N <= 24 && N >= 0)) {, but yours works too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure I m gonna try your simpler approach.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you copied the condition incorrectly

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes..

@@ -0,0 +1,21 @@
--TEST--
GH-18481 date_sunrise with utcOffset as INF
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
GH-18481 date_sunrise with utcOffset as INF
GH-18481 (date_sunrise with utcOffset as INF)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected nan value ext/date/php_date.c

2 participants