Check if timestamp is today

后端 未结 7 967
傲寒
傲寒 2020-12-29 19:28

I\'ve got a timestamp in the following format (Which can easily be changed thanks to the beauties of PHP!).

2011-02-12 14:44:00

7条回答
  •  心在旅途
    2020-12-29 19:58

    if (date('Y-m-d') == date('Y-m-d', strtotime('2011-02-12 14:44:00'))) {
        // is today
    }
    

提交回复
热议问题