/**
* 獲取指定日期所在月的開始日期與結束日期
* @param string $date
* @param boolean 為true返回開始日期
* @return array
* @access private
*/
private function getMonthRange( $date
$timestamp = strtotime( $date );
if ( $returnFirstDay ) {
$monthFirstDay = date(
return $monthFirstDay;
} else {
$mdays = date(
$monthLastDay = date(
return $monthLastDay;
}
}
From:http://tw.wingwit.com/Article/program/PHP/201311/21079.html