Recently due to the need to work with PHP get the current week and last week's start date and end date. Online to find the next, no suitable, so I did a summary. The specific content and code are as follows.
' Echo ' This week's End date: ', $now _end, '
' Echo ' last week start date: ', $last _start, '
'; Echo ' last week's End date: ', $last _end, '
';
Note: Since the foreign week begins in Sunday, the Chinese habit starts from Monday, so the direct use of Strtotime ("last Monday") will result in incorrect results.
Articles you may be interested in
- PHP gets the start timestamp and end timestamp for today, yesterday, last week, this month
- PHP gets the timestamp of the start time and end time of the week of the specified date
- PHP gets a list of dates 30 days before the current date
- PHP Extract the birthday date from the ID number and the function to verify whether it is a minor
- PHP to add a backslash in front of the reason and PHP to remove the backslash method, three ways to close the PHP magic quotes
- PHP calculates the function of two dates apart, how many months, how many days
- thinkphp Automatic validation and auto-fill Invalid workaround
- PHP gets the week of the specified date, the first day of the month, and the last day
http://www.bkjia.com/PHPjc/779409.html www.bkjia.com true http://www.bkjia.com/PHPjc/779409.html techarticle recently due to the need to work with PHP get the current week and last week's start date and end date. Online to find the next, no suitable, so I did a summary. Specific content and generation ...