PHP date operation code-lunar calendar-solar conversion, leap year, computing days, etc. This is a practical PHP date and time Operation class, it includes the Gregorian calendar-conversion of the lunar calendar, conversion to the Chinese date
PHP obtains the year, month, and day of the current week based on the year, month, and day of the current day.
// Obtain the end date of the latest week corresponding to the year, month, and day.
Function GetClearWeek (){
Obtain the year, month, and day of the current week from the year, month, and day of the current week from the year, month, and day of the current day.
PHP code
// Obtain the end date of the latest week corresponding to the year, month, and Day.
PHP returns the start timestamp of the current year, month, and day, And the start timestamp of the next year, month, and day. The current Start Time
1. timestamp of the current year
2. timestamp of the current month
3. Current day Timestamp
4.
: 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
/** * 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 last Sunday deadline for the date of month and year may cross the moon across the years
function Getclearweek () {
$year _month_day_over = Array ();
$year = Date (' Y '); Four-bit year
$month = Date (' n '); 1 to 12
$day
PHP Gets the current time (year, month, day, hour, minute, second)
1echo date ("h:i");
Date
(PHP 3, PHP 4)
date-formatting a local time/date
Description
String date (string format [, int timestamp])
Returns a string that is the result of the
This article mainly introduces the relevant information about how to judge the leap year of a java interview question. For more information, see the following java leap year judgment Preface: Determine whether the year is a leap year for a given
The phpDate () function outputs the Chinese year, month, day, hour, minute, and second ,. The phpDate () function outputs the Chinese year, month, day, hour, minute, and second. of course, the php date function cannot directly output the Chinese
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.