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
Example #1 Further DateTime::add examples
Result: 2000-01-01 10:00:30
2007-06-05 04:03:02
Example #2 Beware when adding months
Result: 2001-01-31
2001-03-03
Example #3 DateTime::add example
Result: 2000-01-11