V站笔记
PHP时间函数 :time(),date(),mktime()区别
checkdate : 验证日期的正确性。
date : 将服务器的时间格式化。...getdate : 获得时间及日期信息。
gettimeofday : 取得目前时间。
gmdate : 取得目前与 GMT 差后的时间。
easter_date : 计算复活节日期。...本函数可以用来检查日期是否有效。有效范围如下:
年 为 0 至 32767 年
月 为 1 至 12 月
日 则随着月份及闰年变化
date 将服务器的时间格式化。...语法: string date(string format, int [timestamp]);
返回值: 字符串
函数种类: 时间日期
内容说明返回值的©字符串依配置的格式来决定。..."m")-1,date("d"), date("Y")); $nextyear = mktime(0,0,0,date("m"), date("d", date("Y")+1);
参考 gmdate()