|
@@ -36,7 +36,7 @@ class CustomerGiftReceives extends Model
|
36
|
36
|
if(!$info){
|
37
|
37
|
$times++;
|
38
|
38
|
#判断现在距离会员结束还有几个月,最后一个月不算
|
39
|
|
- $start = new \DateTime(date('Y-m-d',time()));
|
|
39
|
+ $start = new \DateTime(date('Y-m-t',time()));
|
40
|
40
|
$end = new \DateTime(date('Y-m-d',strtotime($endTime.' -1 day')));
|
41
|
41
|
$diff = $start->diff($end);
|
42
|
42
|
$diff_month = $diff->format('%y')*12+$diff->format('%m');
|
|
@@ -44,7 +44,7 @@ class CustomerGiftReceives extends Model
|
44
|
44
|
return $times;
|
45
|
45
|
} else {
|
46
|
46
|
#判断现在距离会员结束还有几个月,最后一个月不算
|
47
|
|
- $start = new \DateTime(date('Y-m-d',time()));
|
|
47
|
+ $start = new \DateTime(date('Y-m-t',time()));
|
48
|
48
|
$end = new \DateTime(date('Y-m-d',strtotime($endTime.' -1 day')));
|
49
|
49
|
$diff = $start->diff($end);
|
50
|
50
|
$diff_month = $diff->format('%y')*12+$diff->format('%m');
|