PHP ManualDateTime::modifydate_modify(PHP 5 >= 5.2.0) DateTime::modify -- date_modify — Alters the timestamp DescriptionObject oriented style Procedural style Alter the timestamp of a DateTime object by incrementing or decrementing in a format accepted by strtotime(). Parameters
Return Values
Returns the DateTime object for method chaining or Changelog
ExamplesExample #1 DateTime::modify() example Object oriented style
<?php Procedural style
<?php The above examples will output: 2006-12-13 Example #2 Beware when adding or subtracting months
<?php The above example will output: 2001-01-31 2001-03-03 See Also
![]() |
PHP-Index
New Tutorial entries
|