xxxxxxxxxx
// replace time() with the time stamp you want to add one day to
$startDate = time();
date('Y-m-d H:i:s', strtotime('+1 day', $startDate));
xxxxxxxxxx
$one_year = new DateInterval('P1Y');
$one_year_ago = new DateTime();
$one_year_ago->sub($one_year); //get the interval since 1 year ago
/*
Properties
y Number of years.
m Number of months.
d Number of days.
h Number of hours.
i Number of minutes.
s Number of seconds.
f Number of microseconds, as a fraction of a second.
invert Is 1 if the interval represents a negative time period and 0 otherwise. See DateInterval::format().
days If the DateInterval object was created by DateTimeImmutable::diff() or DateTime::diff(), then this is the total number of full days between the start and end dates. Otherwise, days will be false.
from_string If the DateInterval object was created by DateInterval::createFromDateString(), then this property's value will be true, and the date_string property will be populated. Otherwise, the value will be false, and the y to f, invert, and days properties will be populated.
date_string The string used as argument to DateInterval::createFromDateString().
*/