php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #53706 Misleading example on datediff format page
Submitted: 2011-01-10 11:44 UTC Modified: 2011-01-12 04:54 UTC
From: php at olliebuck dot com Assigned: aharvey (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.3.5 OS:
Private report: No CVE-ID: None
 [2011-01-10 11:44 UTC] php at olliebuck dot com
Description:
------------
---
From manual page: http://www.php.net/datetime.diff#See Also
---

The example on this page http://php.net/manual/en/datetime.diff.php suggests using '%d' to determine the number of days between 2 dates

It would be clearer if it either used %a, or included %m in the example, if the dates you are comparing are more than a month apart %d is not what it initially appears to be in the documentation.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-12 04:52 UTC] aharvey@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: aharvey
 [2011-01-12 04:54 UTC] aharvey@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=307395
Log: Fix doc bug #53706 (Misleading example on datediff format page).
 [2011-01-12 04:54 UTC] aharvey@php.net
-Status: Assigned +Status: Closed
 [2011-01-12 04:54 UTC] aharvey@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 09:00:02 2026 UTC