php时间求法(二)

发表于:2007-05-25来源:作者:点击数: 标签:php求法tomorrowY-m-dDate

$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));  //下一年


原文转自:http://www.ltesting.net