盡我有限的知識和能力PHP下面的代碼應該工作: <?php
////DISPLAY DATE OF NEXT COUNCIL MEETING////
$now = date('U'); //get current time
$firstTues = strtotime("-1 month first Tuesday 4pm"); //get first Tuesday of the mon
PHP的strtotime()默認使用當前年份。如何獲得未來的日期? echo date('l d. M Y', strtotime('first sunday of april')); // Sunday 03. Apr 2016
我不能設法讓四月的下一個第一個星期日。日期不能在過去,它必須始終是相對的(沒有2017或2018硬編碼)。 echo date('l d. M Y', strto
中的兩個時間戳所以現場是,我有一家店在晚上1點開門,晚上10點關門。 對於任何當前時間,我只是想檢查時間戳是否位於商店開放時間和關閉時間之間。 Yeap很簡單,但我不知道爲什麼,我覺得很難。下面的 是我嘗試的一段史詩般的狗屎。 <?php
$t=time(); //for current time
$o = date("Y-m-d ",$t)."01:00:00"; //store open