PHP calculates the start and end date of the week of the specified date, PHP date
This example describes how PHP calculates the start and end dates for the week in which a specified date is located. Share to everyone for your reference. The implementation method is as follows:
Calculate a week start end date<?php$time= $_post[year]. ' -'. $_post[month]. ' -'. $_post[day]. ' 00:00:00 '; Echo (' The time you entered is: '. $time. '
$lastday =date ("y-m-d", Strtotime ("$time Sunday")); Echo (' The first day of the week entered is: '. Date ("Y-m-d", Strtotime ("$lastday-6 days" )).'
Echo (' Input time of Week last day is: '. $lastday);? >
I hope this article is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/972632.html www.bkjia.com true http://www.bkjia.com/PHPjc/972632.html techarticle PHP calculates the start and end date of the week of the specified date, PHP date This example describes how PHP calculates the start and end dates of the week in which a specified date is located. Share for the big ...