|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-01-20 11:41 UTC] 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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 18:00:02 2026 UTC |
Actually it is a little more complicated than that. You can have any value, including negatives and values greater than the expected range. For today, 20th Jan 2011, php -r "echo date('r', mktime(0,0,0,-10,-3));" Thu, 28 Jan 2010 00:00:00 +0000