/** * [获取某一月份的归集列表] * @param [string] $babyId [宝贝id] * @param [string] $month [月份,如2014-7] * @return [type] [description] */ public function getCalList($babyId, $month) { //如果month没设置,则第一天为当月的1号,最后一天为当月最后一天 if ($month == '') { $firstday = strtotime(date('Y-m-01 00:00:00', $_SERVER['REQUEST_TIME'])); $endday = strtotime(date('Y-m-t 23:59:59', $_SERVER['REQUEST_TIME'])); } else { $res = explode('-', $month); $day = Common::monthToDay($res['0'], $res['1']); $firstday = $day['0']; $endday = $day['1']; } return array('flag' => '1', 'callist' => $this->locusmodel->callist($babyId, $firstday, $endday)); }