Doc #79939 [Opn->Csd]: RFC 822 and 2822 missing from DateTime "Compound Formats"
[email protected] Thu, 02 Jun 2022 17:30:19 +0000
| Newsgroups | php.doc.bugs |
|---|---|
| Message-ID | <[email protected]> |
Edit report at https://bugs.php.net/bug.php?id=79939&edit=1 ID: 79939 Updated by: [email protected] Reported by: thomas at landauer dot at Summary: RFC 822 and 2822 missing from DateTime "Compound Formats" -Status: Open +Status: Closed Type: Documentation Problem Package: Date/time related PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Automatic comment on behalf of derickr Revision: https://github.com/php/doc-en/commit/48e99212ad659f3aa5e0202e0194f9f13612c024 Log: Fixed bug #79939: RFC 822 and 2822 missing from DateTime 'Compound Formats' Previous Comments: ------------------------------------------------------------------------ [2020-08-06 19:30:55] [email protected] That's basically what I was thinking too. ------------------------------------------------------------------------ [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] [email protected] 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