PHP itself is a simple and powerful language, PHP date format is still more commonly used, so I studied the PHP date format, here to take out and share with you, hope to be useful to everyone. The PHP language has core features such as powerful string and array processing capabilities, while greatly improving the support for object-oriented programming (PHP5 and above).
By using standard and optional extensions, PHP applications can connect more than 10 databases such as MySQL or Oracle, draw, create PDF files, and create parsing XML files. You can also use the C language to write your own PHP extension module. For example, provide an interface function for PHP in a code base that already exists. You can also run PHP under Windows, use COM to control other Windows applications such as Word and Excel, or use ODBC to connect to the database, let's go over the PHP date format in detail.
1, Leap year, week, day
echo Date (' L ');
Leap Year: 0
echo Date (' L ');
Today is: Tuesday
echo Date (' D ');
Today is: Tue
Uppercase L Indicates whether the year is a leap, Boolean, true return 1, otherwise 0; lowercase l indicates the day of the week is written in English full (Tuesday), while uppercase D is used to denote the 3-character abbreviation (Tue) of days of the week.
echo Date (' W ');
Today's Week: 2
echo Date (' W ');
This week is the No. 06 week of the year. The lowercase w represents the day of the week, in numeric form, and capital W represents the number of weeks in a year.
echo Date (' t ');
This month is 28 days
echo Date (' Z ');
Today is the 36th day of the year, lowercase t represents the current month and how many days, lowercase z means today is the day of the year.
2, other
echo Date (' T ');
Utc
Capital T indicates the server's time zone setting
echo Date (' I ');
0
Uppercase I indicates whether the current is daylight saving time, returns 1 for true, otherwise 0
echo Date (' U ');
1170769424
The capital U represents the total number of seconds from January 1, 1970 to the present, which is the UNIX timestamp for the Unix time era.
echo Date (' C ');
2007-02-06t14:24:43+00:00
Lowercase C represents the ISO8601 date, the date format is YYYY-MM-DD, the letter T is used to interval the date and time, the time format is HH:MM:SS, and the time zone is represented by the deviation of Greenwich Mean Time (GMT).
echo Date (' R ');
Tue, Feb 2007 14:25:52 +0000
The lowercase R represents the RFC822 date. The small date () function shows the powerful function and charm of PHP, and then compares the ASP, hehe.
http://www.bkjia.com/PHPjc/446508.html www.bkjia.com true http://www.bkjia.com/PHPjc/446508.html techarticle PHP itself is a simple and powerful language, PHP date format is still more commonly used, so I studied the PHP date format, here to take out and share with you, I hope to everyone ...