Doc #79939 [Opn]: RFC 822 and 2822 missing from DateTime "Compound Formats"
| From: | requinix@php.net | Date: | Thu, 06 Aug 2020 19:30:56 +0000 |
| Subject: | Doc #79939 [Opn]: RFC 822 and 2822 missing from DateTime "Compound Formats" | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-17753@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79939&edit=1
ID: 79939
Updated by: requinix@php.net
Reported by: thomas at landauer dot at
Summary: RFC 822 and 2822 missing from DateTime "Compound
Formats"
Status: Open
Type: Documentation Problem
Package: Date/time related
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
That's basically what I was thinking too.
Previous Comments:
------------------------------------------------------------------------
[2020-08-06 19:15:01] thomas at landauer dot at
Well, OK, but when a page starts with "This page describes the different compound date/time
formats that the [...] parser understands.", I'd expect that this is a *complete* list of
everything the parser understands.
So you could at least add a note like "Plus all RFC formats mentioned at https://www.php.net/manual/en/class.datetime.php
"
------------------------------------------------------------------------
[2020-08-06 18:59:16] requinix@php.net
Because those formats don't need any special handling. They're just regular date strings.
Notice how the other RFCs aren't mentioned either?
------------------------------------------------------------------------
[2020-08-06 12:39:58] thomas at landauer dot at
Description:
------------
Passing an RFC 822 or RFC 2822 formatted DateTime string into the DateTime() constructor works, but
it's not documented at https://www.php.net/manual/datetime.formats.compound.php
However, there are constants for both, and they are mentioned at https://www.php.net/manual/class.datetime.php
Test script:
---------------
// RFC 822:
new DateTime('Mon, 15 Aug 05 15:52:01 +0000');
// RFC 2822:
new DateTime('Mon, 15 Aug 2005 15:52:01 +0000');
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79939&edit=1