Constant of the newly added date function in PHP5

Source: Internet
Author: User
Tags http cookie
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 );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.