php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #72259 DateInterval->Format page documentation incorrect
Submitted: 2016-05-24 21:55 UTC Modified: 2016-06-26 04:22 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: mimiller at ncsa dot illinois dot edu Assigned: cmb (profile)
Status: No Feedback Package: Documentation problem
PHP Version: 5.6.21 OS: MacOSX
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
28 + 22 = ?
Subscribe to this entry?

 
 [2016-05-24 21:55 UTC] mimiller at ncsa dot illinois dot edu
Description:
------------
http://php.net/manual/en/dateinterval.format.php

indicates:

H	Hours, numeric, at least 2 digits with leading 0	01, 03, 23
h	Hours, numeric	1, 3, 23


should read:

H	Hours, numeric 0 - 23, at least 2 digits with leading 0	01, 03, 23
h	Hours, numeric 1 - 12, at least 2 digits with leading 0	1, 3, 12



Test script:
---------------
$this->format('H'); #returns 00 - 23

$this->format('h'); #returns 01 - 12

Expected result:
----------------
web page will document the format function properly.


Patches

dateintervalformatdocfix (last revision 2016-05-24 21:58 UTC by mimiller at ncsa dot illinois dot edu)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-06-14 11:24 UTC] cmb@php.net
-Status: Open +Status: Feedback
 [2016-06-14 11:24 UTC] cmb@php.net
I can't verify the described behavior, see
<https://3v4l.org/meQFK#v550>. Do you get another result?
 [2016-06-15 00:08 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2016-06-26 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 18:01:28 2024 UTC