2009/07/23

[PHP] 期間内に指定日が入っているかテストする関数

// $testdayが期間内($startday~$finishingday)か調べる。
// $testday省略時は本日
function checkperiod ($startingday, $finishingday, $testday = null)
{
  if (!$testday) $testday = time();

  return strtotime ($startingday) < $testday && $testday < strtotime ($finishingday) ? true : false;
}

0 件のコメント:

Ubuntu 24.04 Server で VitualBoxの Autostartを

 VirtualBoxのインストールをを aptでインストールしたが autostartでvmが起動しなかったのでChatGPTに聞きながらやっと起動できるようになったのでそのメモ。