php date()函數說明

string date ( string format [, int timestamp] )     //其中timestamp爲可選,默認值爲time();

 

 

date("1");    //Monday

date("m.d.y");   //12.21.09

date("m.d.Y");//12.21.2009

$tomorrow  = mktime(0, 0, 0, date("m")  , date("d")+1, date("Y"));
$lastmonth = mktime(0, 0, 0, date("m")-1, date("d"),   date("Y"
));
$nextyear  = mktime(0, 0, 0, date("m"),   date("d"),   date("Y")+1
);

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章