Constants of the newly added date function in PHP 5 _php tutorial

Source: Internet
Author: User
Tags echo date http cookie rfc
PHP 5.1.1 defines the following constants to provide a standard date expression method, which can be used for date format functions such as Date ().

Date_atom (String)

Atomic clock format (eg: 2005-08-15t15:52:01+00:00)

Date_cookie (String)

HTTP cookie format (e.g. Mon, 2005 15:52:01 UTC)

date_iso8601 (String)

ISO-8601 (eg: 2005-08-15t15:52:01+0000)

date_rfc822 (String)

RFC 822 (e.g.: Mon, 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 (e.g.: Mon, 2005 15:52:01 UTC)

date_rfc2822 (String)

RFC 2822 (eg: Mon, 2005 15:52:01 +0000)

Date_rss (String)

RSS (eg: Mon, 2005 15:52:01 UTC)

DATE_W3C (String)

World Wide Web Consortium (e.g., 2005-08-15t15:52:01+00:00)

For example, to output a date format that RSS requires, you can simply implement it with the following code:

echo Date (DATE_RSS);

"Related articles"


http://www.bkjia.com/PHPjc/446777.html www.bkjia.com true http://www.bkjia.com/PHPjc/446777.html techarticle PHP 5.1.1 defines the following constants to provide a standard date expression method, which can be used for date format functions such as Date (). Date_atom (string) atomic clock format (eg: 2005-08-15t15:52:01+00 ...

  • 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.