Doc #53798 [Bgs]: specify range for month and day in mktime
| From: | matteosistisette at gmail dot com | Date: | Thu, 20 Jan 2011 11:09:03 +0000 |
| Subject: | Doc #53798 [Bgs]: specify range for month and day in mktime | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-5844@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53798&edit=1
ID: 53798
User updated by: matteosistisette at gmail dot com
Reported by: matteosistisette at gmail dot com
Summary: specify range for month and day in mktime
Status: Bogus
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Well that's exactly what should be specified in the documentation, or
more simply:
Month: number of the month (1 through 12)
just like it is documented for the date() function
Previous Comments:
------------------------------------------------------------------------
[2011-01-20 11:46:49] rquadling@php.net
The day, month and year values supplied are not indexes or offsets, so
"0-based"
is not relevant.
------------------------------------------------------------------------
[2011-01-20 11:41:10] matteosistisette at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.mktime
---
Documentation says about the "month" parameter:
"month
The number of the month.
"
It should specify that this is 1-based, i.e. January is 1 and December
is 12.
This is not obvious, as some languages use 0-based indexes (i.e. 0 for
january and 11 for december)
To be rigorous, the same holds for days, thought I guess it is more
obvious that the first day of the month is counted as 1 and not 0 so
this may not be necessary, thought it wouldn't hurt.
Anyway for the number of the month it is absolutely vital to specify it.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53798&edit=1