date_isodate_set
date_offset_get
Date/Time Functions
PHP Manual

# date_modify

(PHP 5 >= 5.1.0)

date_modify — Alters the timestamp

### Description

void date_modify ( DateTime `$object` , string `$modify` )
void DateTime::modify ( string `$modify` )

### Parameters

`object`

  DateTime object.

`modify`

  String in a relative format accepted by strtotime().

### Return Values

Returns `NULL` on success or `FALSE` on failure.

### Examples

Example #1 A date_modify() example

`<?php
$date = new DateTime("2006-12-12");
$date->modify("+1 day");
echo $date->format("Y-m-d");
?>`

The above example will output:

    2006-12-13

### See Also

- strtotime()

date_isodate_set
date_offset_get
Date/Time Functions
PHP Manual