Re: Re: PHP 4.0 Bug #4708 Updated: date() is broke regarding february

From: Date: Tue, 30 May 2000 21:11:55 +0000
Subject: Re: Re: PHP 4.0 Bug #4708 Updated: date() is broke regarding february
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-19812@lists.php.net to get a copy of this message
Just pick the 5th of the month or something. When you are playing right along the boundaries timezones will cause you problems. ie. in your mktime() call, use 0,0,0,$i,5,2000 On Tue, 30 May 2000, Jeff Eidsness wrote: > > > Bug Database wrote: > > > > ID: 4708 > > Updated by: rasmus > > Reported By: jeffers@thatcalendarplace.com > > Status: Closed > > Bug Type: Misbehaving function > > Assigned To: > > Comments: > > > > 983520000 is a timestamp in March. It is exactly 31 days beyond the 980841600 timestamp > > which you list as being in January. Since there aren't 31 days in February, that timestamp > > must be in March and PHP gets it right. > > That makes sense, however, i am trying to make a list of the next 13 > months using something like this: > > // $now is equal to the month, in this case, 5 (for may) > for($i=$GLOBALS[now];$i<($GLOBALS[now]+13);$i++) { > print("<font face='arial'>\n"); > print("<a href='calendar.html?date=" . mktime(0, 0, 0, $i) . "' > "); > print("class='small'>"); > print(date("F", mktime(0,0,0, $i))); > print("</a></font><br>\n"); > } > > How do i get it to find February? Or is that beyond the scope of the > buglist? :) thanks for the heads up. > >

« previous php.dev (#19812) next »