廊坊网络公司提供当前时间前后推移后的时间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 下周六当然是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了! |