What does I mean in date in php
I in date in php is the capital form of i, indicating whether the date is in daylight saving time, if it is daylight saving time, it is 1, otherwise it is 0; while the lowercase i means "minute", with a leading Zero 00 to 59.
#The operating environment of this article: Windows7 system, PHP7.1, Dell G3 computer.
What does I mean in date in php?
date() function formats the local date and time and returns the formatted date string.
语法:date(format,timestamp);
The meaning of each letter in the PHP date date function
There are some characters with predefined meanings that you can use to create format strings. They are:
format 必需。规定输出日期字符串的格式。 可使用下列字符: d - 一个月中的第几天(从 01 到 31) D - 星期几的文本表示(用三个字母表示) j - 一个月中的第几天,不带前导零(1 到 31) l('L' 的小写形式)- 星期几的完整的文本表示 N - 星期几的 ISO-8601 数字格式表示(1表示Monday[星期一],7表示Sunday[星期日]) S - 一个月中的第几天的英语序数后缀(2 个字符:st、nd、rd 或 th。与 j 搭配使用) w - 星期几的数字表示(0 表示 Sunday[星期日],6 表示 Saturday[星期六]) z - 一年中的第几天(从 0 到 365) W - 用 ISO-8601 数字格式表示一年中的星期数字(每周从 Monday[星期一]开始) F - 月份的完整的文本表示(January[一月份] 到 December[十二月份]) m - 月份的数字表示(从 01 到 12) M - 月份的短文本表示(用三个字母表示) n - 月份的数字表示,不带前导零(1 到 12) t - 给定月份中包含的天数 L - 是否是闰年(如果是闰年则为 1,否则为 0) o - ISO-8601 标准下的年份数字 Y - 年份的四位数表示 y - 年份的两位数表示 a - 小写形式表示:am 或 pm A - 大写形式表示:AM 或 PM B - Swatch Internet Time(000 到 999) g - 12 小时制,不带前导零(1 到 12) G - 24 小时制,不带前导零(0 到 23) h - 12 小时制,带前导零(01 到 12) H - 24 小时制,带前导零(00 到 23) i - 分,带前导零(00 到 59) s - 秒,带前导零(00 到 59) u - 微秒(PHP 5.2.2 中新增的) e - 时区标识符(例如:UTC、GMT、Atlantic/Azores) I(i 的大写形式)- 日期是否是在夏令时(如果是夏令时则为 1,否则为 0) O - 格林威治时间(GMT)的差值,单位是小时(实例:+0100) P - 格林威治时间(GMT)的差值,单位是 hours:minutes(PHP 5.1.3 中新增的) T - 时区的简写(实例:EST、MDT) Z - 以秒为单位的时区偏移量。UTC 以西时区的偏移量为负数(-43200 到 50400) c - ISO-8601 标准的日期(例如 2013-05-05T16:34:42+00:00) r - RFC 2822 格式的日期(例如 Fri, 12 Apr 2013 12:01:05 +0200) U - 自 Unix 纪元(January 1 1970 00:00:00 GMT)以来经过的秒数 同时,也可使用下列预定义常量(从 PHP 5.1.0 开始可用): DATE_ATOM - Atom(例如:2013-04-12T15:52:01+00:00) DATE_COOKIE - HTTP Cookies(例如:Friday, 12-Apr-13 15:52:01 UTC) DATE_ISO8601 - ISO-8601(例如:2013-04-12T15:52:01+0000) DATE_RFC822 - RFC 822(例如:Fri, 12 Apr 13 15:52:01 +0000) DATE_RFC850 - RFC 850(例如:Friday, 12-Apr-13 15:52:01 UTC) DATE_RFC1036 - RFC 1036(例如:Fri, 12 Apr 13 15:52:01 +0000) DATE_RFC1123 - RFC 1123(例如:Fri, 12 Apr 2013 15:52:01 +0000) DATE_RFC2822 - RFC 2822(Fri, 12 Apr 2013 15:52:01 +0000) DATE_RFC3339 - 与 DATE_ATOM 相同(从 PHP 5.1.3 开始) DATE_RSS - RSS(Fri, 12 Aug 2013 15:52:01 +0000) DATE_W3C - 万维网联盟(例如:2013-04-12T15:52:01+00:00)
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What does I mean in date in php. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

If you are an experienced PHP developer, you might have the feeling that you’ve been there and done that already.You have developed a significant number of applications, debugged millions of lines of code, and tweaked a bunch of scripts to achieve op

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

A string is a sequence of characters, including letters, numbers, and symbols. This tutorial will learn how to calculate the number of vowels in a given string in PHP using different methods. The vowels in English are a, e, i, o, u, and they can be uppercase or lowercase. What is a vowel? Vowels are alphabetic characters that represent a specific pronunciation. There are five vowels in English, including uppercase and lowercase: a, e, i, o, u Example 1 Input: String = "Tutorialspoint" Output: 6 explain The vowels in the string "Tutorialspoint" are u, o, i, a, o, i. There are 6 yuan in total

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

What are the magic methods of PHP? PHP's magic methods include: 1.\_\_construct, used to initialize objects; 2.\_\_destruct, used to clean up resources; 3.\_\_call, handle non-existent method calls; 4.\_\_get, implement dynamic attribute access; 5.\_\_set, implement dynamic attribute settings. These methods are automatically called in certain situations, improving code flexibility and efficiency.
