使用php的strtotime
实例:比如现在时间是“2017-07-06”,加一个月。

echo   date("Y-m-d", strtotime("+1 months", strtotime("2017-07-06")));
<?php
echo(strtotime("now"));
echo(strtotime("3 October 2005"));
echo(strtotime("+5 hours"));
echo(strtotime("+1 week"));
echo(strtotime("+1 week 3 days 7 hours 5 seconds"));
echo(strtotime("next Monday"));
echo(strtotime("last Sunday"));
?>
print_r(date('Y-m-d H:i:s',strtotime("+1 month")));

最新文章

  1. SQL Server2016升级前几点自检
  2. UEditor独立图片、文件上传模块
  3. Dancing Link --- 模板题 HUST 1017 - Exact cover
  4. [Swift]枚举
  5. SCOM随笔
  6. js字符串倒序
  7. HDOJ(HDU) 1718 Rank(水题、、、)
  8. 2014.9.3数据库CRUD
  9. hibernate---一对一双向外键关联 (重要)
  10. Implement a Linked List
  11. 在Winform混合式框架中整合外部API接口的调用
  12. python学习之路web框架
  13. SSRS----关于图表参考线(平均线)的添加
  14. Annotation 的第一个工程
  15. HTML5 - Canvas【申明:来源于网络】
  16. Python高级网络编程系列之第三篇
  17. 17. Letter Combinations of a Phone Number(bfs)
  18. for循环跳转语句(break、continue)
  19. Linux学习笔记:Shell脚本学习
  20. NPM和Yarn添加淘宝镜像

热门文章

  1. Reids学习1 -- 初识Redis
  2. C#轻量级通通讯组件StriveEngine —— C/S通信开源demo(2) —— 使用二进制协议 (附源码)
  3. 工具安装(mac)
  4. 理解 Linux 的虚拟内存
  5. 移动端video标签默认置顶的解决方案
  6. SpringMVC框架三:参数绑定
  7. 和我一起熟悉caffe2
  8. openjtag 的硬件连接踩坑历程
  9. 描述一下 cookies,sessionStorage 和 localStorage 的区别
  10. 内存管理-buddy[代码]