|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-03-31 14:20 UTC] tularis@php.net
[2003-03-31 15:07 UTC] pollita@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 03:00:01 2025 UTC |
So I have some code that prints out this and next month's calendar and populates the cells with the day's events. Sometimes, and I can't find root cause except to say that there MUST be a bug in the date() function or the mktime() function because I have a line of code to produce NEXTmonth's month name in text, and it is producing the month TWO months later instead of 1, despite my +1 increment... $tyear = date("Y"); // the year - 4 digit $nyear = date("Y")+1; $tmonth = date("n"); // the month - no leading 0's $nmonth = date("n")+1; $tday = date("j"); // the day as a number date("F",mktime(0,0,0,$nmonth,$tday,$tyear)); This line can produce not the NEXT month, but TWO months later... Driving me crazy... -Jeremy