标签:create months color star int 时间戳 blog 时间 div
时间记录,不是时间戳
1 $thismonth = date(‘m‘); 2 $thisyear = date(‘Y‘); 3 $startDay = $thisyear . ‘-‘ . $thismonth . ‘-1‘; 4 $endDay = $thisyear . ‘-‘ . $thismonth . ‘-‘ . date(‘t‘, strtotime($startDay)); //当月最后一天 5 $time1 =date(‘Y-m-1 H:i:s‘,strtotime($startDay)); //当月第一天 6 $time2 = date(‘Y-m-d H:i:s‘,strtotime(‘+24 hour‘,strtotime($endDay))); //下个月月第一天 7 $monthScore =PointLog::where([[‘create_time‘,‘>=‘,$time1],[‘create_time‘,‘<=‘,$time2]])->where(‘userid‘,‘=‘,$_COOKIE[‘userid‘])->sum(‘point‘);
标签:create months color star int 时间戳 blog 时间 div
原文地址:http://www.cnblogs.com/wanlibingfeng/p/7099220.html