Blogger Information
Blog 18
fans 0
comment 0
visits 24488
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
strtotime函数
耀的博客
Original
1648 people have browsed it

int strtotime(string $time[,int $now=time()])

函数功能:它能将英文文本的日期时间描述解析为unix时间戳。

函数参数说明:1、传入一个字符串的时间;2、可选参数为是否传入unix时间戳,如果不传则是当前的unix时间戳。

示例:

echo strtotime('now');//当前时间

echo strtotime('10 September 2010');//2010年9月10日

echo strtotime('+1day');//当前时间加一天

echo strtotime('+1week');当前时间加一周

echo strtotime('+1week 2days 4hours 8seconds');//当前时间加一周2天4小时8秒

echo strtotime('next Thursday');//下周四

echo srototime('last Monday');//上周一


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post