Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP date_modify() Function

PHP date_modify() Function

PHP Date/Time PHP Date/Time Reference Manual

Example

Modify a timestamp. Add 15 days:

Run Example »


Definition and Usage

The date_modify() function modifies a timestamp.

Syntax

date_modify(

object,modify);

Parameters Description
object Required. Specifies a DateTime object returned by date_create() DateTime object returned by
modify Required. Specifies a date/time string.

Technical Details

Return Value: Returns a DateTime object on success, or FALSE on failure.
PHP Version: 5.2+
Changelog: PHP 5.3.0: The return value changed from NULL to DateTime.

PHP Date/Time PHP Date/Time Reference Manual