当前位置:网站首页>php⽉份加减最简单的处理⽅法
php⽉份加减最简单的处理⽅法
2022-07-28 11:24:00 【历史老师-】
从PHP5.3开始, date新增了⼀系列修正短语, 来明确这个问题, 那就是”first day of” 和 “last day of”,
如下:
月份减一 | 月份加一
$month = date("Y-m-d", strtotime("last day of -1 month", strtotime("2022-07-25")));
$month = date("Y-m-d", strtotime("first day of +1 month", strtotime("2022-07-25")));
边栏推荐
- R language ggplot2 visualization: use the ggdotplot function of ggpubr package to visualize dot plot, set the add parameter, add violin graph to the dot plot, and add the vertical line of mean standar
- Several reincarnation stories
- Untiy中控制Animation的播放速度
- 15、用户web层服务(三)
- 14. User web layer services (II)
- Matlab sets the size of graphics window and image and the position of legend
- ES6 knowledge points supplement
- [diary of supplementary questions] [2022 Niuke summer multi school 2] i-let fat tension
- Final modifier attribute
- 14、用户web层服务(二)
猜你喜欢

Application of mobile face stylization Technology

Hcip (condition matching and OSPF packet related knowledge)

A new mode of one-stop fixed asset management

boost官网搜索引擎项目详解

Redis installation

Detailed explanation of boost official website search engine project

Unity 一键替换场景中的物体

Stored state and running state of program
![[leetcode] 8. binary search · binary search](/img/35/c4ff66c124754c2a9a7d63b8040e4a.png)
[leetcode] 8. binary search · binary search

Service Workers让网站动态加载Webp图片
随机推荐
A natural choice
Final modifier attribute
Alexnet - paper analysis and reproduction
什么是WordPress
Launcher sample code
Unitywebrequest is used in unity to load network and local pictures
Article summary of MinGW installation and use
WebView详解
R language uses LM function to build regression model with interactive items, and uses: sign (colon) to represent the interaction of variables (colon is pure multiplication, excluding the constituent
[diary of supplementary questions] [2022 Hangdian summer school 2] k-dos card
[pyGame practice] the super interesting bubble game is coming - may you be childlike and always happy and simple~
[general database integrated development environment] Shanghai daoning provides you with Aqua Data Studio downloads, tutorials, and trials
consul安装与配置
多线程与高并发(三)—— 源码解析 AQS 原理
[pyGame practice] when the end of the world comes, how long can you live in a cruel survival game that really starts from scratch?
Docker runs MySQL service
Go deadlock - when the channel meets mutex
Client service registration of Nacos registry
IDEA复制模块
【补题日记】[2022牛客暑期多校2]L-Link with Level Editor I