|
@@ -37,7 +37,7 @@ class CustomerGiftReceives extends Model
|
37
|
37
|
$times++;
|
38
|
38
|
#判断现在距离会员结束还有几个月,最后一个月不算
|
39
|
39
|
$start = new \DateTime(date('Y-m-d',time()));
|
40
|
|
- $end = new \DateTime($endTime);
|
|
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');
|
43
|
43
|
$times += $diff_month;
|
|
@@ -45,7 +45,7 @@ class CustomerGiftReceives extends Model
|
45
|
45
|
} else {
|
46
|
46
|
#判断现在距离会员结束还有几个月,最后一个月不算
|
47
|
47
|
$start = new \DateTime(date('Y-m-d',time()));
|
48
|
|
- $end = new \DateTime($endTime);
|
|
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');
|
51
|
51
|
$times += $diff_month;
|