PHP - add 1 day to date format mm-dd-yyyy

前端 未结 6 464
无人共我
无人共我 2020-12-09 01:30

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-09 01:52

    The format you've used is not recognized by strtotime(). Replace

    $date = "04-15-2013";
    

    by

    $date = "04/15/2013";
    

    Or if you want to use - then use the following line with the year in front:

    $date = "2013-04-15";
    

提交回复
热议问题