PHP date () function, phpdate Function

Source: Internet
Author: User

PHP date () function, phpdate Function

Related Parameters

1. Y (y)-m (M, F)-d

Where:Year① The full name of year is displayed when the year is Y;

② When the year is y, the last two digits of the year are displayed;

Month③ When the month is M, three abbreviated months are displayed;

④ When the monthly value is F, the full name of the month is displayed;

⑤ When the month is m, the month indicated by a number is displayed, with a leading zero;

DayDay 6 indicates that the day of the month is displayed as d, with a leading zero;

2. Week: W (the week in the year, for example, 42 represents the 42nd week of the year)

Where:WeekThe Day (1) indicates the day of the week, and the three letters indicate the day of the week;

② The day is represented as l (lowercase letter of 'l') and the day of the week is displayed in the complete text format;

3. hour/minute/Second: H (h, G, g): I: s

Where:Hour① Indicates that the 24-hour format is displayed when H is used, and there is a leading zero;

   Hour② Indicates that the 12-hour format is displayed when h is used, and there is a leading zero;

   Hour③ If the value is G, the system is displayed in the 24-hour format without leading zeros;

   Hour④ If it is g, it is displayed in 12-hour format, with no leading zero;

   MinuteWhen I is expressed as I, the number of leading minutes is displayed;

   Seconds6 seconds indicates that a leading number of seconds is displayed when s is used;

4. Time Zone: (e, I, O, P, T, Z)

Among them: ① etime zone ID;

② When I is running;

③ Hours in which O differs from Greenwich Mean Time;

④ The difference between P and Greenwich Mean Time. There are colons between hours and minutes;

⑤ T the time zone of the local machine;

⑥ The number of seconds of the Z time difference offset. The Time Zone offset to the west of UTC is always negative, and the time zone offset to the east of UTC is always positive;

5. Complete date/time (c, r, U)

Where: ① c is a date in ISO8601 format;

② Date in RFC822 format;

③ U is the number of seconds since the UNIX epoch;

 

 

   

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.