如果$date=date_create_from_format(<;!--某些代码-->;),那么我该如何在$d


If $date = date_create_from_format(<!--some code-->), then how do I add a day to $date?

我有一个日期:

$date = date_create_from_format(<!--some code-->)

我想增加一天这样:

$date->add(+1 day)->format('F jS, Y')

这里,"->add(+1 day)"是所需函数/操作的伪代码,用于向$date添加一天。不知道如何实现,因为我不知道$date是什么样的对象或使用什么过程"->(some operation)"或"somefunction($date)"

使用'DateInterval:添加一天的示例

echo (new 'DateTime())->add(new 'DateInterval('P1D'))->format('Y-m-d')