PHP Get start date and end date for this week and last week _php tutorial

Source: Internet
Author: User
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 ...

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.