网站首页 | 公司介绍 | 服务项目 | 作品展示 | 联系方式

首页 >> 设计技巧设计技巧
廊坊网络公司提供当前时间前后推移后的时间php算法

当前时间一周之后的时间戳:strtotime(”+1 week”),这样就行了,一周之后是这样我想N周之后类同……

一个月之后是strtotime(”+1 months”);

5天之后的时间呢当然是:strtotime(”+5 days”);

12个小时之后呢?strtotime(”+12 hours”);

20分钟之后当然是:strtotime(”+20 minutes”);

30秒之后就是strtotime(”+30 seconds”);

上周六的时间呢?应该是 strtotime(”Last  Saturday“);

下周六当然是strtotime(”Next Saturday”);了

也可以写复杂一点儿的,当前时间一个月零两周,零5天,零4个小时20分钟50秒后的时间:

date(”Y-m-d H:i:s”,strtotime(”+1 months +1 week +5 days +4 hours +20 minutes +50 seconds”));

当前时间之后的时间是“+”,之前的时间用“-”就OK了!

版权所有 © 2010-2012 廊坊易路设计公司 冀ICP备09040021号地址:廊坊市建国道东方新天地427室 邮箱:quanmiao@yahoo.cn