date_modify

It  alters the timestamp and is an alias of DateTime::modify()
Example

<?php
$date = date_create(‘2007-05-17’);
date_modify($date, ‘+2 day’);
echo date_format($date, ‘Y-m-d’);
?>

Output

2007-05-19

Share