Doc #79304 [NEW]: Doc. for DateTime::createFromFormat/date_create_from_format not consistent
From: patrick dot kuijvenhoven at gmail dot com
Operating system:
PHP version: Irrelevant
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:Doc. for DateTime::createFromFormat/date_create_from_format not consistent
Description:
------------
Reference https://www.php.net/manual/en/datetime.createfromformat.php
Please notice where X and Y are present in each column in the following
table:
+---------------------+------------------------------+-----------------+
| format | description | example
|
+---------------------+------------------------------+-----------------+
| X and Y | ... with (X) or without (Y) | 01 to 31 (X) or
|
| (alphabetical sort) | leading zeros ... | 1 to 31 (Y)
|
+---------------------+------------------------------+-----------------+
This style works for "d and j", "D and l", "m and n".
The time variants "g and h" and "G and H" do not follow this style.
This can be fixed by replacing "with or without" to "without or with" in
the "description" column for these formats. So, suggested to rewrite
as:
+--------------+-------------------------+--------------------------------+
| format | description | example
|
+--------------+-------------------------+--------------------------------+
| g and h | ... without or with ... | 01 thought 12 or 01 through
12 |
| G and H | ... without or with ... | 0 thought 23 or 00 through 23
|
+--------------+-------------------------+--------------------------------+
Another option could be to explicitly mention the format in the
description, thus like "... without (G) or with (H) ...".
--
Edit bug report at https://bugs.php.net/bug.php?id=79304&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79304&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79304&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79304&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79304&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79304&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79304&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79304&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79304&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79304&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79304&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79304&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79304&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79304&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79304&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79304&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79304&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79304&r=mysqlcfg
Thread (13 messages)
- patrick dot kuijvenhoven at gmail dot com
- patrick.kuijvenhoven@gmail.comDoc #79304 [PATCH]: Doc. for DateTime::createFromFormat/date_create_from_format not consistent
- derick@php.netDoc #79304 [Opn]: Doc. for DateTime::createFromFormat/date_create_from_format not consistent
- patrick dot kuijvenhoven at gmail dot comDoc #79304 [Opn]: patrick.kuijvenhoven@gmail.com
- patrick dot kuijvenhoven at gmail dot comDoc #79304 [Opn]: Doc. for DateTime::createFromFormat/date_create_from_format not consistent
- johnlilly055 at gmail dot comDoc #79304 [Com]: Doc. for DateTime::createFromFormat/date_create_from_format not consistent
- derodixeyari at getnada dot comDoc #79304 [Com]: Doc. for DateTime::createFromFormat/date_create_from_format not consistent
- wewpyou1 at gmail dot comDoc #79304 [Com]: Doc. for DateTime::createFromFormat/date_create_from_format not consistent
- wewpyou1 at gmail dot comDoc #79304 [Com]: Doc. for DateTime::createFromFormat/date_create_from_format not consistent
- Janet22coffect at gmail dot comDoc #79304 [Com]: Doc. for DateTime::createFromFormat/date_create_from_format not consistent
- Gordon896Herzog at gmail dot comDoc #79304 [Com]: Doc. for DateTime::createFromFormat/date_create_from_format not consistent
- pfmlogin1 at gmail dot comDoc #79304 [Com]: Doc. for DateTime::createFromFormat/date_create_from_format not consistent
- kevonaol1 at aol dot comDoc #79304 [Com]: Doc. for DateTime::createFromFormat/date_create_from_format not consistent