欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

PHP獲取昨天、今天及明天日期的方法

 更新時間:2016年02月03日 10:54:06   作者:pythoner  
這篇文章主要介紹了PHP獲取昨天、今天及明天日期的方法,涉及PHP針對時間與日期的相關(guān)操作技巧,非常簡單實(shí)用,需要的朋友可以參考下

本文實(shí)例講述了PHP獲取昨天、今天及明天日期的方法。分享給大家供大家參考,具體如下:

//PHP返回昨天的日期
function get_last_date() {
 $tomorrow = mktime(0,0,0,date("m"),date("d")-1,date("Y"));
 return date("Y-m-d", $tomorrow);
}
//PHP返回今天的日期
function get_today_date() {
 $today=date("Y-m-d");
 return today;
}
//PHP返回明天的日期
function get_tomorrow_date() {
 $tomorrow = mktime(0,0,0,date("m"),date("d")+1,date("Y"));
 return date("Y-m-d", $tomorrow);
}

更多關(guān)于php相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《php日期與時間用法總結(jié)》、《php常用函數(shù)與技巧總結(jié)》及《php面向?qū)ο蟪绦蛟O(shè)計(jì)入門教程

希望本文所述對大家PHP程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評論