You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
derickr
changed the title
DateInterval::createFromDateString does not warn when non-relative items are present
DateInterval::createFromDateString does not throw non-relative items are present
May 5, 2022
derickr
added a commit
to derickr/php-src
that referenced
this issue
May 5, 2022
@derickr The documentation for createFromDateString() says it takes the "relative formats" supported by the parser. That links to the relative formats page which includes this example:
"2 days ago", "8 days ago 14:00", "2 months 5 days ago", "2 months ago 5 days", "2 days ago"
Description
The following code:
Resulted in no warning.
But I expected a warning telling me that the
15:30
was going to be ignored.PHP Version
PHP 8.2.0-dev
Operating System
No response
The text was updated successfully, but these errors were encountered: