PHP calculates the start and end dates of the week of the specified date. PHP calculates the start and end dates of the week of the specified date. This article describes how php calculates the start and end dates of the week of the specified date. We will share with you how to use PHP to calculate the start and end dates of the week of the specified date.
This example describes how PHP calculates the start and end dates of the week of the specified date. Share it with you for your reference. The specific implementation method is as follows:
Calculates the end date of a week.<? 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 ('input time day of the week is :'. date ("Y-m-d", strtotime ("$ lastday-6 days ")).'
'); Echo ('the last day of the input time is:'. $ lastday);?>
I hope this article will help you with php programming.
Examples in this article describes how PHP calculates the start and end dates of the week of the specified date. Share it with you...