date -- 格式化一个本地时间/日期
说明
string date ( string format [, int timestamp] )
建议楼主查一下php手册先:
http://www.php.net/manual/zh/function.date.php
说明
string date ( string format [, int timestamp] )
建议楼主查一下php手册先:
http://www.php.net/manual/zh/function.date.php
php有一个Date/Time 日期/时间函数库
http://cn2.php.net/manual/zh/ref.datetime.php
echo strtotime("10 September 2000"), "\n";
echo strtotime("+1 day"), "\n";
echo strtotime("+1 week"), "\n";
echo strtotime("+1 week 2 days 4 hours 2 seconds"), "\n";
echo strtotime("next Thursday"), "\n";
echo strtotime("last Monday"), "\n";
$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);
?>