php 将当前时间戳unixtime增加时间间隔的方法
可以+year 还可以是天,月日都可以的,如下代码:
<?php
echo strtotime("+1 year");//返回时间戳, 如果要转换成一般时间格式还需要下面的函数
echo date('Y-m-d H:i:s', strtotime("+1 year"));//将当前时间戳增加一年(year)
echo strtotime("now"), "\n";
echo strtotime("10 September 2000"), "\n";
echo strtotime("+1 day"), "\n";
echo strtotime("+1 week"), "\n";
echo strtotime("+1 week 2 days 4 hours 2 seconds"), "\n";
echo strtotime("next Thursday"), "\n";
echo strtotime("last Monday"), "\n";
echo date("Y-m-d", strtotime("+1 months", strtotime("2010-10-06"))), "\n";
?>热门推荐
10 男朋友祝福语简短新年
11 中秋妈妈生日祝福语简短
12 医生节蛋糕祝福语简短
13 生日祝福语大全女孩简短
14 校长退休文案祝福语简短
15 离别简短的祝福语大全
16 生病祝福语简短文案
17 许愿星姐妹祝福语简短
18 表达朋友的祝福语简短