php 明天,下个星期,时间函数
例子:
<?php $nextWeek = time() + (7 * 24 * 60 * 60); // 7 days; 24 hours; 60 mins; 60secs echo 'Now: '. date('Y-m-d') ."\n"; echo 'Next Week: '. date('Y-m-d', $nextWeek) ."\n"; ?>
输出:
<pre>Now: 2005-03-30
Next Week: 2005-04-07</pre>
例子:
<?php $nextWeek = time() + (7 * 24 * 60 * 60); // 7 days; 24 hours; 60 mins; 60secs echo 'Now: '. date('Y-m-d') ."\n"; echo 'Next Week: '. date('Y-m-d', $nextWeek) ."\n"; ?>
输出:
<pre>Now: 2005-03-30
Next Week: 2005-04-07</pre>