$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"))); //明天
$yesterday = 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"));
$date1="2006-08-09″;
echo date(’Y-m-d’,strtotime("$date1 +5 day")); //相应地,要增加月,年,将day改成month或year即可
$tomorrow = date("Y-m-d", mktime(0,0,0,date("m") ,date("d")+1,date("Y"))); //明天
$yesterday = 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"));
$date1="2006-08-09″;
echo date(’Y-m-d’,strtotime("$date1 +5 day")); //相应地,要增加月,年,将day改成month或year即可
作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/1080/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
评论列表