PHPDate()函数详细参数.docx.pdf

上传人:tbuqq 文档编号:5616294 上传时间:2020-07-02 格式:PDF 页数:8 大小:154.60KB
返回 下载 相关 举报
PHPDate()函数详细参数.docx.pdf_第1页
第1页 / 共8页
PHPDate()函数详细参数.docx.pdf_第2页
第2页 / 共8页
PHPDate()函数详细参数.docx.pdf_第3页
第3页 / 共8页
PHPDate()函数详细参数.docx.pdf_第4页
第4页 / 共8页
PHPDate()函数详细参数.docx.pdf_第5页
第5页 / 共8页
点击查看更多>>
资源描述

《PHPDate()函数详细参数.docx.pdf》由会员分享,可在线阅读,更多相关《PHPDate()函数详细参数.docx.pdf(8页珍藏版)》请在三一文库上搜索。

1、PHP Date ()函数详细参数 Add to the front page of the page Date_default_timezone_set (PRC) ; / * the time to Beijing time, the default is PHP5 GMT * / Date () A: m( am or rM A: 人Am( AM or PM D: a few days, two figures, if not enough, make up zero; from 01 to 31 D: weeks, 3 English letters, such as F: month

2、s, full name in English, such as: ,zJanuary. H: 12 hour hours, from 01 to 12 H: 24 hour hours, from 00 to 23 G: hours 12 hours, not zero; from 1 to 12 G: J : hours 24 hours, not zero; from 0 to 23 a few days, in sufficient not by zero; from to 31“ L: whats the weeks full English name, such as: “Frid

3、ay?“ M: months, two digits, from 01 to 12“ N: months, two digits, not zero; from 1 to 12 M: months, 3 English letters, such as: “Jan“ S: seconds; from 00to 59 S:, plus English ordinal, two English letters, such as 21th“ T: specifies the number of days in the month, from 28 to 31U: total seconds W: d

4、igital week, from 0 (Sunday) to 6 (Saturday) ,z In Y:, four digits In y:, two digits Z: the first few days of the year; from 1 to 366 1, year, month, day Indicates that Y and lowercase y can be capitalized in year; You can use uppercase F, uppercase M, lowercase m and lowercase n (two ways to repres

5、ent characters and numbers, respectively); Indicates that the day can be lowercase D and lowercase J, and uppercase S indicates the suffix of the date? Echo date (Y-m-j); 2007-02-6 Echo date ( y-n-j); 07-2-6 The upper case Y stands for the four digit number in the year, while the lower case y stands

6、 for the two digit number in the year; The lower case M represents the number of months (with the preamble), while the lower case n represents the month numbers without preamble? Echo date (Y-M-j); 2007-Feb-6 Echo date ( Y-m-d ,); 2007-02-06 The upper case M represents the 3 abbreviated characters i

7、n the month, while the lower case M represents the numbers in the month (with the leading 0); No uppercase J, only the lower case J represents the date of the month, no preamble o; if the month is preceded, the guideline uses lower case D. Echo date (Y-M-j); 2007-Feb-6 Echo date ( Y-F-jS); 2007-Febr

8、uary-6th The upper case represents the 3 short characters in the month, while the upper case means full English writing in the month? (no lowercase f) The upper case S indicates the suffix of the date, such as “ST“, “nd“, Rdand “th?What is the date of the date? 2 hours: Minutes: seconds By default,

9、PHP explains the time of “Greenwich mean time“, which is 8 hours apart from our local time? Echo date ( g: i: s A); 5:56:57 am Echo date ( h: i : s A , ); 05:56:57 AM Lower case g stands for 12 hour system, no preamble 0, and lower case h indicates 12 hour system with preamble 0. When using the 12 h

10、our system, you need to show up in the afternoon. Lowercase a stands for lowercase anT and PM,and uppercase A means and in uppercase? Echo date ( G: i: s); 14:02:26 The upper case G stands for the number of hours in 24 hours, but without the preamble; the H with uppercase indicates the 24 hour hour

11、with a preamble Brief summary: The letter stands for an hour without preamble, and the letter H indicates “hour lead“; Lower case g and H represent 12 hour system, upper case G and H indicate 24 hour system? 3,leap year, week and day Echo date ( L); Is this year a leap year: 0 Echo date (I); Today i

12、s: Tuesday Echo date (D ,); Today is: Tue The upper case L indicates whether there is a leap year this year, the Boolean value is true, and the return is 1, otherwise 0; Lower case 1 means the full day of the week (Tuesday); Use uppercase D to indicate the 3 character abbreviation (Tue) of the week?

13、 Echo date C w); Today , s week: 2 Echo date ( W); This week is the 06 week of the year The lower case w means the week, and the numeric form indicates The upper case W indicates the number of weeks in a year Echo date ( t); This is the 28 day of the month Echo date ( z); Today is the thirty-sixth d

14、ay of the year The lower case t indicates how many days the current month is Lower case Z means today is the first day of the year 4,others Echo date CT); UTC The upper case T indicates the servei ? s time zone settings Echo date (T ); Zero The capitalization I indicates whether the current is dayli

15、ght saving time, or returns 1 for true, otherwise 0 Echo date ( U); One billion one hundred and seventy million seven hundred and sixty-nine thousand four hundred and twenty-four The capitalization U represents the total number of seconds from January 1, 1970 to the presenl, which is the UNIX timest

16、amp of the Unix epoch ? Echo date ( c); 2007-02-06T14:24:43+00:00 The lower case C represents the IS08601 date, the date format is YYYY-MM-DD, the letter T is used to separate the date and time, the time format is HH:MM:SS, and the time zone is expressed by the deviation of Greenwich mean time (GMT)

17、? Echo date C r ); Tue, 06, Feb, 2007, 14:25:52, +0000 Lower case R represents the RFC822 date? 5,formatting time Echo $rowt_time ; output 2008-2-29 12:08:00 Echo date (Y-nrd,($tow“, ,zt_timez, ); Output 2008-2-29 Note that the time since $rowt_timeis already a string, so strtotime is required Turn to time) turn around, or else output 1970-01-01 error

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 其他


经营许可证编号:宁ICP备18001539号-1