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
{{ message }}
Repository navigation
DateInterval::createFromDateString does not throw non-relative items are present #8458
changed the title [-]DateInterval::createFromDateString does not warn when non-relative items are present[/-][+]DateInterval::createFromDateString does not throw non-relative items are present[/+]on 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"
Activity
[-]DateInterval::createFromDateString does not warn when non-relative items are present[/-][+]DateInterval::createFromDateString does not throw non-relative items are present[/+]derickr commentedon May 11, 2022
Merged.
othercorey commentedon May 12, 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:
Should the 14:00 part be removed from those docs?
https://www.php.net/manual/en/datetime.formats.relative.php