PHP date函数常用时间处理方法
echo"今天:".date("Y-m-d")."<br>";
echo"昨天:".date("Y-m-d",strtotime("-1day")),"<br>";
echo"明天:".date("Y-m-d",strtotime("+1day"))."<br>";
echo"一周后:".date("Y-m-d",strtotime("+1week"))."<br>"; echo"一周零两天四小时两秒后:".date("Y-m-dG:H:s",strtotime("+1week2days4hours2seconds"))."<br>"; echo"下个星期四:".date("Y-m-d",strtotime("nextThursday"))."<br>"; echo"上个周一:".date("Y-m-d",strtotime("lastMonday"))."<br>"; echo"一个月前:".date("Y-m-d",strtotime("lastmonth"))."<br>"; echo"一个月后:".date("Y-m-d",strtotime("+1month"))."<br>"; echo"十年后:".date("Y-m-d",strtotime("+10year"))."<br>"; strtotime()函数的作用是将日期时间描述解析为Unix时间戳 intstrtotime(stringtime[,intnow])
热门推荐
6 天仙配简短祝福语
10 牛年祝福语简短搞笑的
11 新婚祝福语致老师简短
12 晚辈给长辈祝福语简短
13 给妈妈祝福语简短内容
14 生日弟弟祝福语 简短独特
15 冬日问候祝福语大全简短
16 饭店国庆祝福语简短
17 六一祝福语简短十六字
18 中秋祝福语简短女朋友