日期减去1年?
我有一个这样的日期:
2009-01-01如何返回同一日期但比一年前早的日期?
回答:
您可以使用strtotime:
$date = strtotime('2010-01-01 -1 year');该strtotime函数返回unix时间戳,可以使用date以下格式的字符串:
echo date('Y-m-d', $date); // echoes '2009-01-01'以上是 日期减去1年? 的全部内容, 来源链接: utcz.com/qa/404754.html

