|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-01-29 11:16 UTC] lehn at planet-ic dot de
Description:
------------
mktime produces wrong month for february if no day parameter given.
Reproduce code:
---------------
echo strftime("%B(%m)\n",mktime(0,0,0,2));
echo strftime("%B(%m)\n",mktime(0,0,0,2,1));
Expected result:
----------------
February(02)
February(02)
Actual result:
--------------
March(03)
February(02)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 18:00:01 2025 UTC |
Thank you for your fast reply. I looked the manual twice before but i overlooked the default value of '$day = date("j")'. This kind of problems only happen in the last few days of a month, maybe a eye catching warning on the manual will help.