strtotime result makes no sense, php bug?

后端 未结 3 1700
醉梦人生
醉梦人生 2021-02-18 14:38

The following line:

echo date(\'d\', strtotime(\'First Saturday August 2015\'));

prints 08, which doesn\'t seem to make any sense

3条回答
  •  别跟我提以往
    2021-02-18 15:41

    You need an 'of':

    date('d/m/Y', strtotime('First Saturday of August 2015'))
    

    see the manual: http://docs.php.net/manual/en/datetime.formats.relative.php

提交回复
热议问题