DateTime::sub
PHP 5 >= 5.3.0, PHP 7, PHP 8
DateTime::sub - Subtracts an amount of days, months, years, hours, minutes and seconds from
a DateTime object
Example #1 Further DateTime::sub examples
Result: 2000-01-19 13:59:30
1992-08-15 19:56:58
Example #2 Beware when subtracting months
Result: 2001-03-30
2001-03-02
Example #3 DateTime::sub example
Result: 2000-01-10