Doc #62486 [Csd]: Missing documentation for DatePeriod
| From: | aharvey@php.net | Date: | Fri, 20 Jul 2012 09:40:52 +0000 |
| Subject: | Doc #62486 [Csd]: Missing documentation for DatePeriod | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-8616@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62486&edit=1
ID: 62486
Updated by: aharvey@php.net
Reported by: logos-php at kith dot org
Summary: Missing documentation for DatePeriod
Status: Closed
Type: Documentation Problem
Package: Date/time related
Operating System: Linux
PHP Version: Irrelevant
Assigned To: aharvey
Block user comment: N
Private report: N
New Comment:
Wrong quick fix, but you get the idea. Expect improved DatePeriod documentation soon. :)
Previous Comments:
------------------------------------------------------------------------
[2012-07-20 09:39:25] aharvey@php.net
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2012-07-20 09:39:22] aharvey@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=326735
Log: Fix doc bug #62486 (Missing documentation for DatePeriod).
------------------------------------------------------------------------
[2012-07-05 19:16:20] logos-php at kith dot org
Description:
------------
---
From manual page: http://www.php.net/class.dateperiod
---
The DatePeriod page doesn't give any information that I can find about the class
of the objects that result from iterating over it.
In particular, as far as I can tell, if you do a foreach on a DatePeriod, the
instances of the iterator are DateTime objects. Which is great--it's exactly what
I wanted--but it doesn't appear to be documented.
Perhaps it's obvious to people who know more about iterators. But for me, I had
to figure it out by reading people's posts, and confirm it by reading this Stack
Overflow answer: (http://stackoverflow.com/questions/3416288/parameterizing-php-
code-with-dateperiod-dateinterval-classes)
More generally, the DatePeriod page doesn't really explain at all what a
DatePeriod is or how to use it. Fortunately, the user-supplied examples help a
lot with that.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62486&edit=1