php时间求法(二)
时间:2005-04-05 来源:Digico
$tomorrow = date( "Y-m-d", mktime(0,0,0,4,1+1,2005));
$tomorrow = date( "Y-m-d", mktime(0,0,0,date("m") ,date("d")+1,date("Y"))); //明天
$tomorrow = date( "Y-m-d", mktime(0,0,0,date("m") ,date("d")-1,date("Y"))); //昨天
$lastmonth = date( "Y-m-d", mktime(0,0,0,date("m")-1,date("d"), date("Y"))); //上一个月
$nextyear = date( "Y-m-d", mktime(0,0,0,date("m"), date("d", date("Y")+1)); //下一年
$today = date("Ymd",strtotime ("+1 day"));
day 加一天
week 加一星期
year 加一年
month 加一月
相关阅读 更多 +