I have a PHP date in the form of 2013-01-22
and I want to get tomorrows date in the same format, so for example 2013-01-23
.
How is this pos
/**
* get tomorrow's date in the format requested, default to Y-m-d for MySQL (e.g. 2013-01-04)
*
* @param string
*
* @return string
*/
public static function getTomorrowsDate($format = 'Y-m-d')
{
$date = new DateTime();
$date->add(DateInterval::createFromDateString('tomorrow'));
return $date->format($format);
}