PHP取得指定日期的 星期的开始时间 结束时间

WBOY
Release: 2016-06-13 13:11:53
Original
833 people have browsed it

PHP获得指定日期的 星期的开始时间 结束时间

$time= date("Y-m-d H:i:s");
echo('你输入的时间是:'.$time.'');
$lastday=date("Y-m-d",strtotime("$time Sunday"));
echo('输入的时间星期第一天是:'.date("Y-m-d",strtotime("$lastday - 6 days")).'<br>');
echo('输入的时间星期最后一天是:'.$lastday);
Copy after login
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