• 有效期增加3个月
1
2
3
4
5
6
7
8
9
10
$pirorTime = time();
$t = strtotime("$this->expire_date");

if($t > $pirorTime)
{
$pirorTime = $t;
}
$pirorDate = date("Y-m-d", $pirorTime);

$this->expire_date = date("Y-m-d", strtotime("$pirorDate +3 months"));
  • 获取本周日日期
1
date('Y-m-d',strtotime('0 sunday', time()));