php取得年の開始時間と終了時間
377 ワード
private function gettimes(year){year){smonth = 1; $emonth = 12;
$startTime = $year.'-'.$smonth.'-1 00:00:00';
$em = $year.'-'.$emonth.'-1 23:59:59';
$endTime = date('Y-m-t H:i:s',strtotime($em));
return array('stime'=>strtotime($startTime),'etime'=>strtotime($endTime));
}