-2
我試圖建立我的議程在PHP中,使用strtotime返回日期基於什麼想要的用戶,但我觀察一個理解的問題whith strtotime!本月的第一天
當我說Fisrt 2014年9月的星期一,它給了我9月8日。 normaly它應該返回9月1日!
您認爲如何?
<?php
$j = strtotime("First Monday Septembre 2014");
echo date('d F',$j);
?>
上
<?php
$j = strtotime("First Monday July 2013");
echo date('d F',$j);
?>
同樣的問題,否則,當這一天是不是在每月第一個它給你天權
可能重複的[利用日期在PHP當前月份的第一天\ _modify作爲DateTime對象(http://stackoverflow.com/questions/2094797/the-first-day-of -the-current-month-in-php-using-date-modify-as-datetime-object) – RichardBernards 2014-11-21 10:52:14
可能的重複http://stackoverflow.com/questions/7724954/php-strtotime-first-monday-february-returns-第二 - 星期一 - 如果二月一日 - 是 – Mrlitty 2014-11-21 10:53:46