|
|
@ -1576,6 +1576,7 @@ class TimingController extends AdminController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
list($becomeTimeList,$becomeTimeCount) = $this->getAffairList(date('Y-m',strtotime(date('Y',$time).'-'.(date('m',$time)-1).'-01')));
|
|
|
|
list($becomeTimeList,$becomeTimeCount) = $this->getAffairList(date('Y-m',strtotime(date('Y',$time).'-'.(date('m',$time)-1).'-01')));
|
|
|
|
|
|
|
|
// dump([$becomeTimeList,$becomeTimeCount]);die();
|
|
|
|
|
|
|
|
|
|
|
|
$time1 = date('Y-m',strtotime(date('Y',$time).'-'.(date('m',$time)-1).'-01'));
|
|
|
|
$time1 = date('Y-m',strtotime(date('Y',$time).'-'.(date('m',$time)-1).'-01'));
|
|
|
|
$time2 = date('Y-m',strtotime(date('Y',$time).'-'.(date('m',$time)-2).'-01'));
|
|
|
|
$time2 = date('Y-m',strtotime(date('Y',$time).'-'.(date('m',$time)-2).'-01'));
|
|
|
@ -1735,11 +1736,25 @@ class TimingController extends AdminController {
|
|
|
|
|
|
|
|
|
|
|
|
function diffDate($date1,$date2)
|
|
|
|
function diffDate($date1,$date2)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$datetime1 = new \DateTime($date1);
|
|
|
|
if(strtotime($date1)>strtotime($date2)){
|
|
|
|
$datetime2 = new \DateTime($date2);
|
|
|
|
$tmp=$date2;
|
|
|
|
$interval = $datetime1->diff($datetime2);
|
|
|
|
$date2=$date1;
|
|
|
|
$time = $interval->format('%m');
|
|
|
|
$date1=$tmp;
|
|
|
|
return $time;
|
|
|
|
}
|
|
|
|
|
|
|
|
list($Y1,$m1,$d1)=explode('-',$date1);
|
|
|
|
|
|
|
|
list($Y2,$m2,$d2)=explode('-',$date2);
|
|
|
|
|
|
|
|
$y=$Y2-$Y1;
|
|
|
|
|
|
|
|
$m=$m2-$m1;
|
|
|
|
|
|
|
|
$d=$d2-$d1;
|
|
|
|
|
|
|
|
if($d<0){
|
|
|
|
|
|
|
|
$d+=(int)date('t',strtotime("-1 month $date2"));
|
|
|
|
|
|
|
|
$m--;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if($m<0){
|
|
|
|
|
|
|
|
$m+=12;
|
|
|
|
|
|
|
|
$y--;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return $m+1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|