#18636 [NEW]: Where is February?

From: Date: Tue, 30 Jul 2002 08:41:03 +0000
Subject: #18636 [NEW]: Where is February?
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-15547@lists.php.net to get a copy of this message
From: mypsycho101@hotmail.com Operating system: WinNT PHP version: 4.2.2 PHP Bug Type: Date/time related Bug description: Where is February? I wanted to list all the months, days and years. The script that I used written below. $year = date("Y"); $month = date("m"); $mday = date("d"); get_date($month,$mday,$year,"airway_month","airway_day","airway_year"); function get_date($month,$day,$year,$moname,$dayname,$yearname) { //get the month print "<select name=\"$moname\">\n<option value=\"0\">Month</option>"; for ($m=1;$m<=12;$m++) { if ($m <10) $nm = "0".$m; else $nm=$m; print "<option value=\"".$nm."\">".date("F",mktime(0,0,0,$m,$day,$year))."</option>\n"; } print "</select>\n/\n"; // get the day print "<select name=\"$dayname\">\n<option value=\"0\">Date</option>\n"; $limit = 31; for ($d=1;$d<=$limit;$d++) { if ($d < 10) $nd= "0".$d; else $nd = $d; print "<option value=\"".$nd."\">".$nd."</option>\n"; } print "</select>\n/\n"; // get the year $yr_strt = $year - 1; $yr_end = $year + 5; print "<select name=\"$yearname\">\n<option value=\"0\">Year</option>\n"; for ($y=$yr_strt;$y<=$yr_end;$y++) { echo "<option value=\"".$y."\">".$y."</option>\n"; } print "</select>\n"; } When I view my HTML source, the month of February is not displayed. Instead there would be two instances of March. I would appreciate if you would inform me if there is something wrong with the script or function. Thank you. -- Edit bug report at http://bugs.php.net/?id=18636&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=18636&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=18636&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=18636&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=18636&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=18636&r=support Expected behavior: http://bugs.php.net/fix.php?id=18636&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=18636&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=18636&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=18636&r=globals

« previous php.bugs (#15547) next »