php date()

PHP Date() 函数把时间戳格式化为更易读的日期和时间。

date(format,timestamp)

format:显示时间的格式。  timestamp:可选。规定时间戳。默认是当前时间和日期。

date('Y-m-d')当前系统时间。

 date('Y-m-d',strtotime('-1 weeks'))当前时间减去一周,还可以 - 1 days

 -------------------------------------------------------------------------------------------------

原文地址:https://www.cnblogs.com/kobigood/p/4074172.html