周取专题

php按周取时间段

最近做统计需求,按周统计,获取周的时间段 代码逻辑: $start = '1478863624';$end = '1480505248';function getweek($start, $end){$ret = array();$i = 0;while($start <= $end){$ret[$i]['start'] = date('Y-m-d',$start);$tmp = st