Home > Backend Development > PHP Tutorial > php常用的时间戳

php常用的时间戳

WBOY
Release: 2016-06-20 12:58:32
Original
1013 people have browsed it

strtotime('now')strtotime('today')strtotime('tomorrow')strtotime('yesterday')strtotime(date('Y-m-d', strtotime('+1 day')))strtotime('tomorrow') - time()strtotime(”2009-1-22″)strtotime(”+1 day”)date(”Y-m-d H:i:s”,time())date(”Y-m-d H:i:s”,strtotime(”+1 day”))strtotime(”-1 day”)date(”Y-m-d H:i:s”,time()) date(”Y-m-d H:i:s”,strtotime(”-1 day”))strtotime(”+1 week”)date(”Y-m-d H:i:s”,strtotime(”+1 week”))strtotime(”-1 week”)date(”Y-m-d H:i:s”,strtotime(”-1 week”))strtotime(”next Thursday”)date(”Y-m-d H:i:s”,strtotime(”next Thursday”))strtotime(”last Thursday”)date(”Y-m-d H:i:s”,strtotime(”last Thursday”))
Copy after login

strtotime能将任何英文文本的日期时间描述解析为Unix时间戳;

结合mktime()或date()格式化日期时间获取指定的时间戳,实现所需要的日期时间。

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template