【发布时间】:2014-08-13 12:25:16
【问题描述】:
我需要在 PHP 中的当前 time() 中添加 N 个月和 M 天。我目前的解决方案很简单,但我想知道它是否更简单:)?
$my_time = strtotime("+6 days", strtotime("+1 month", time()));
我也想知道在目标日期是否有机会避开周末(周六和周日)?
【问题讨论】:
-
strtotime("+6 天 1 个月", time());应该这样做
标签: php unix-timestamp strtotime