This is a practical php date-time operation class, which includes the Gregorian-lunar conversion, converted to Chinese date format, the calculation of the lunar calendar days apart, the lunar calendar year to obtain the lunar calendar days, the
Joe Brockmeier briefly introduces the PHP scripting language, discusses the origin, performance, and application Platform of PHP. A simple example of a PHP script illustrates its basic syntax and usage.
If you are working on web-based development,
The following small series for you to share a PHP to get the first few weeks of the start date and the end date of the instance, has a good reference value, I hope to be helpful to everyone. Let's take a look at it with a little knitting.
The
: This article mainly introduces PHP's collection of yesterday's timestamp, current time information array, last week and last week's year, last month and last month's year, if you are interested in the PHP Tutorial, refer.
/*** Get the current time
For examples of PHP acquisition dates, the Fire Academy has given you a lot of information that can be retrieved using fire search. Read some technical blog today, found that the city of Tears of the blog updated a "Use PHP to get the beginning of a
The following is a code for getting the start and end dates of a week in a year through PHP.
function Get_week ($year) {
$year _start = $year . " -01-01" ;
$year _end = $year . " -12-31" ;
$startday =
As for the example of the date of the PHP acquisition, the Fire Academy has given us a lot of information that can be retrieved using a fire search. Reading some technical blog today, I found that the city's blog has updated a "use PHP to get the
Php obtains the code for the days of the year. Copy the code as follows: get the number of days of a month, which can be used for any month functiongetDays ($ month, $ year) {switch ($ month) {case4: case6: case9: case11: $ days30; break; case2
The
This example describes how PHP gets the start and end dates for each week of the year. Share to everyone for your reference. The specific analysis is as follows:
Recent projects need to do a weekly reporting function, you need to know the start
/** * Gets the current time information array * @params void * @return array */function get_current_time_array () {$date = Strtotime (Date (' y-m-d ')); Date time stamp $week = (int) date (' W '); The first week of the Year $
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.