The constant of the newly added date function in PHP5. After php5.1.1, the date function adds the following constants. The following constants are defined from PHP5.1.1 to provide standard date expression methods. they can be used for date format functions (such as date ()). D
After php5.1.1, the date function adds the following constants.
The following constants are defined from PHP 5.1.1 to provide standard date expression methods. they can be used for date format functions (such as date ()).
DATE_ATOM (string)
Atomic clock format (for example, 2005-08-15T15: 52: 01 + 00: 00)
DATE_COOKIE (string)
HTTP cookie format (for example, Mon, 15 Aug 2005 15:52:01 UTC)
DATE_ISO8601 (string)
ISO-8601 (e.g.: 15t15: 52: 01 + 0000)
DATE_RFC822 (string)
RFC 822 (for example, Mon, 15 Aug 2005 15:52:01 UTC)
DATE_RFC850 (string)
RFC 850 (for example, Monday, 15-Aug-05 15:52:01 UTC)
DATE_RFC1036 (string)
RFC 1036 (for example, Monday, 15-Aug-05 15:52:01 UTC)
DATE_RFC1123 (string)
RFC 1123 (for example, Mon, 15 Aug 2005 15:52:01 UTC)
DATE_RFC2822 (string)
RFC 2822 (for example, Mon, 15 Aug 2005 15:52:01 + 0000)
DATE_RSS (string)
RSS (for example, Mon, 15 Aug 2005 15:52:01 UTC)
DATE_W3C (string)
World Wide Web Consortium (for example, 2005-08-15T15: 52: 01 + 00: 00)
For example, to output a date format required by RSS, you can simply implement it using the following code:
Echo date (DATE_RSS );
Bytes. The following constants are defined from PHP 5.1.1 to provide standard date expression methods. they can be used for date format functions (such as date ()). D...