PHP date formatting, date calculation, and obtaining the start and end dates of the current week and month. PHP date formatting and date calculation as well as getting the current week, month header and end date PHP date format and date calculation
PHP obtains the number of weeks of a year, the start date and end date of a week, and the start date of a week. PHP obtains the week, weekly start date, and end date of a year, and the week start date is recently followed by a project, one of the
PHP date formatting and date calculation as well as getting the current week, month and tail date
PHP date formatting and date calculation as well as when getting previous week, month tail date
PHP date formatting Sample code:
/** * Format time
Php date instance: get last week, this week, last month, this month, this quarter, last quarter
For example, php obtained last week, this week, last month, this month, this quarter, and the last quarter.
Use php to obtain the code for this week, last week, this month, last month, and this quarter. Copy the code as follows: echodate (Ymd, strtotime (now), n; echodate (Ymd, strtotime (-1 weekMonday), n; echodate (Ymd, strtotime (-1 weekSunday), n;
Use php to obtain the echodate (Ymd, strtotime (now), n ;?? Echodate (Ymd, strtotime (-1 weekMonday), n ;?? Echodate (Ymd, strtotime (-1 weekSunday), n; get this week, last week, this month, last month, this quarter date with php (abstract)
Echo
Use php to obtain the echodate (Ymd, strtotime (now), n ;?? Echodate (Ymd, strtotime (-1 weekMonday), n ;?? Echodate (Ymd, strtotime (-1 weekSunday), obtained this week, last week, this month, last month, and this quarter date using php (abstract)
Use php to obtain the echodate ("Ymd", strtotime ("now"), and "\ n ";?? Echodate ("Ymd", strtotime ("-1 weekMonday"), "\ n ";?? Echod uses php to obtain this week, last week, this month, last month, and this quarter date (abstract)
Echo date ("Ymd"
Get this week, last week, this month, last month, this quarter date (pick) with PHP
echo Date ("Ymd", Strtotime ("Now"), "\ n";??echo Date ("Ymd", Strtotime ("1 week Monday")), "\ n";??
echo Date ("Ymd", Strtotime ("1 week Sunday")), "\ n";??
echo
This example describes how to convert the date format of the PHP date function. During website development, we often need to process the date and time. in PHP, many date and time functions are provided to facilitate PHP developers to calculate and
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.