A simple implementation code for strtotime in PHP to return the Monday when the time is located. Friends in need can refer to it. The
strtotime() function parses any English text datetime description into a Unix timestamp.
It’s simple:
The code is as follows
代码如下 |
复制代码 |
echo strtotime('-1 Mon',strtotime("2010-01-01"));//返回日期所在时间的星期一
echo strtotime('Mon',strtotime("2010-01-01"));//返回日期所在时间的下一个星期一的时间
|
|
Copy code |
|
echo strtotime('-1 Mon',strtotime("2010-01-01"));//Return the Monday of the date and time
echo strtotime('Mon',strtotime("2010-01-01"));//Returns the time on the next Monday after the date and time
http://www.bkjia.com/PHPjc/628896.htmlwww.bkjia.com
trueTechArticleA simple php strtotime gives a time and returns the Monday where the time is located. Friends who need it can implement the code. refer to. The strtotime() function decodes the date and time description of any English text...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn