The constant of the newly added date function in PHP5. Read the constant of the newly added date function in PHP5. the following constants are defined from PHP5.1.1 to provide the standard date expression method, it 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 _
The following constants are defined in PHP 5.1.1 to provide standard expression methods for date formats (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 );