Summary of PHP date() parameter list_PHP tutorial

WBOY
Release: 2016-07-15 13:34:17
Original
843 people have browsed it

Add

date_default_timezone_set(PRC) on the front page of the page; /*Adjust the time to Beijing time, PHP5 defaults to Greenway Standard time*/

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

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

d: Day, two digits, if insufficient, add zero; from "01" to "31"

D: Day of the week, 3 English letters, such as: "Fri"

F: month, full English name, such as: "January"

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

H: 24 The hour in hourly format, from "00" to "23"

g: The hour in 12-hour format, no zeros are added; from "1" to "12"

G: 24-hour format Hours, no zeros are added; from "0" to "23"

j: Days, no zeros are added; from "1" to "31"

l: Days of the week, Full English name, such as: "Friday"

m: month, two digits, from "01" to "12"

n: month, two digits, no zero padding; from "1" to "12"

M: month, 3 English letters; such as: "Jan"

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

PHP date() parameter S: add an English ordinal number at the end of the word, two English letters, such as: "21th"

t: specify the number of days in the month, from "28" to "31"

U: Total seconds

w: Numeric day of the week, from "0 (Sunday)" to "6 (Saturday)"

Y: Year, four digits

y: year, two digits

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


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445998.htmlTechArticleAdd date_default_timezone_set (PRC) to the front page of the page; /*Adjust the time to Beijing time, php5 defaults to Greenwich Mean Time*/ date ()a: am or pm PHP date() parameter A: AM or PM...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!