Summary PHPdate () parameter list _ PHP Tutorial

Source: Internet
Author: User
Summary: PHPdate () parameter list. Add date_default_timezone_set (PRC) to the front page of the page; * Set the time to Beijing time. php5 defaults to Greenwich Mean Time * date () a: am or pmPHPdate () parameter: AM or PM

Add

Date_default_timezone_set (PRC);/* Set the time to Beijing time, and php5 is the Greenwich Mean Time by default */

Date () a: "am" or "pm"

PHP date () parameter A: "AM" or "PM"

D: Day (s), double-digit number. if it is not enough, it will be zero. from "01" to "31"

D: The day of the week. three English letters, for example, "Fri"

F: Month, full English name, for example, "January"

PHP date () parameter h: 12-hour, from "01" to "12"

H: Hour in 24-hour format, from "00" to "23"

G: the hour in 12-hour format. The value ranges from "1" to "12"

G: the hour in the 24-hour format. The value ranges from 0 to 23"

J: A few days. the number of days from "1" to "31" is not zero"

L: The day of the week. Full English name, for example, "Friday"

M: month, double digit, from "01" to "12"

N: month, double digit, not zero; from "1" to "12"

M: Month, 3 English letters; for example: "Jan"

S: seconds; from "00" to "59"

PHP date () parameter S: ending with an English ordinal number, two English letters, for example, "21th"

T: specifies the number of days in a month, from "28" to "31"

U: total number of seconds

W: number of weeks, from "0 (Sunday)" to "6 (Saturday )"

Y: year, four digits

Y: year, double digit

PHP date () parameter z: The day of the year; from "1" to "366"


Date_default_timezone_set (PRC);/* Set the time to Beijing time. php5 defaults to Greenwich Mean Time */date () a: am or pm PHP date () parameter: AM or PM...

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.