In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces what I express in date in php, which has a certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article. Let's take a look at it.
In php, I in date is the uppercase form of I, indicating whether the date is at daylight saving time, 1 if it is daylight saving time, otherwise 0, while lowercase I indicates "score" with leading 00s to 59.
This article operating environment: Windows7 system, PHP7.1, Dell G3 computer.
The date () function formats the local date and time and returns the formatted date string.
Syntax: date (format,timestamp)
The meaning of each letter in PHP date date function
There are some characters with predefined meanings that you can use to create format strings. They are:
Format is required. Specifies the format of the output date string. The following characters can be used: d-the day of the month (from 01 to 31) D-the text representation of the day of the week (in three letters) j-the day of the month without leading zeros (1 to 31) l (lowercase form of'L')-the full text of the day of the week represents the N-day of the week in ISO-8601 numeric format (1 for Monday [Monday]) 7 for Sunday) S-the English ordinal suffix (2 characters: st, nd, rd, or th) of the day of the month. Used with j) the numeric representation of the day of the week (0 for Sunday [Sunday] 6 for Saturday [Saturday]) z-Day of the year (from 0 to 365) W-number of the week of the year in ISO-8601 numeric format (starting each week from Monday [Monday]) full text representation of F-month (January [January] to December [December]) number of m-month (from 01 to 12) short text representation of M-month (in three The numeric representation of n-month No leading zero (1 to 12) t-number of days contained in a given month L-whether it is a leap year (1 if it is a leap year, otherwise 0) year number Y-year four digits under o-ISO-8601 standard y-year two-digit representation a-lowercase form: am or pmA-uppercase form: AM or PMB-Swatch Internet Time (000 to 999) g-12 hours Without leading zero (1 to 12) G-24 hours, without leading zeros (0 to 23) h-12 hours, with leading zeros (01 to 12) H-24 hours, with leading zeros (00 to 23) I-minutes, with leading zeros (00 to 59) s-seconds With leading zero (00 to 59) u-microseconds (new in PHP 5.2.2) e-time zone identifier (e.g. UTC, GMT, Atlantic/Azores) I (uppercase form of I)-whether the date is at daylight saving time (1 if it is daylight saving time, otherwise 0) the difference of O-Greenwich mean time (GMT) in hours (example: + 0100) P-Greenwich mean time (GMT) The unit is the abbreviation for hours:minutes (new in PHP 5.1.3) T-time zone (example: EST, MDT) Z-time zone offset in seconds. UTC uses a negative offset from the western time zone (- 43200 to 50400) c-ISO-8601 standard date (e.g. 2013-05-05T16:34:42+00:00) r-RFC 2822 format date (e.g. Fri, 12 Apr 2013 12:01:05 + 0200) U-seconds have elapsed since the Unix era (January 1 1970 00:00:00 GMT) The following predefined constants (available since PHP 5.1.0) can also be used: DATE_ATOM-Atom (e.g. 2013-04-12T15:52:01+00:00) DATE_COOKIE-HTTP Cookies (e.g. Friday, 12-Apr-13 15:52:01 UTC) DATE_ISO8601-ISO-8601 (e.g. 2013-04-12T15:52:01+0000) DATE_RFC822-RFC822 (e.g. Fri, 12 Apr 13 155mono 0114000) DATE_RFC850-RFC850 (e.g. Friday 12-Apr-13 15:52:01 UTC) DATE_RFC1036-RFC1036 (e.g. Fri, 12 Apr 13 15:52:01 + 0000) DATE_RFC1123-RFC1123 (e.g. Fri, 12 Apr 2013 15:52:01 + 0000) DATE_RFC2822-RFC2822 (Fri, 12 Apr 2013 15:52:01 + 0000) DATE_RFC3339-same as DATE_ATOM (starting with PHP 5.1.3) DATE_RSS-RSS (Fri 12 Aug 2013 15 12T15:52:01+00:00 52VR 01 + 0000) DATE_W3C-World wide Web Consortium (for example: 2013-04-12T15:52:01+00:00)
Thank you for reading this article carefully. I hope the article "what I mean in date in php" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.