(PHP 5 >= 5.2.0)
DateTime::modify — Alters the timestamp
Alter the timestamp of a DateTime object by incrementing or decrementing in a format accepted by strtotime().
Procedural style only: A DateTime object returned by date_create()
String in a relative format accepted by strtotime().
Returns the modified DateTime.
Пример #1 A date_modify() example
<?php$date = new DateTime("2006-12-12");$date->modify("+1 day");echo $date->format("Y-m-d");?>
Результат выполнения данного примера:
2006-12-13