DateTime::add
PHP 5 >= 5.3.0, PHP 7, PHP 8
DateTime::add - Adds an amount of days, months, years, hours, minutes and seconds to a
DateTime object
Manual
DateTime::add(
DateInterval$interval ): public DateTime
Procedural style
DateTimedate_add DateTimeobject DateIntervalintervalParameters
- object
Procedural style only: A DateTime object returned by date_create. The function modifies this object.
- interval
-
A DateInterval object
Return Values
Returns the DateTime object for method chaining or false on failure.