cvs: phpweb / submit-event.php /include layout.inc

From: Date: Tue, 05 Mar 2002 19:11:20 +0000
Subject: cvs: phpweb / submit-event.php /include layout.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-8981@lists.php.net to get a copy of this message
jimw Tue Mar 5 14:11:20 2002 EDT Modified files: /phpweb/include layout.inc /phpweb submit-event.php Log: fix day calculation Index: phpweb/include/layout.inc diff -u phpweb/include/layout.inc:1.76 phpweb/include/layout.inc:1.77 --- phpweb/include/layout.inc:1.76 Mon Mar 4 21:54:19 2002 +++ phpweb/include/layout.inc Tue Mar 5 14:11:14 2002 @@ -1,5 +1,5 @@ <?php -/* $Id: layout.inc,v 1.76 2002/03/05 02:54:19 jimw Exp $ */ +/* $Id: layout.inc,v 1.77 2002/03/05 19:11:14 jimw Exp $ */ # spacer() # print a IMG tag for a sized spacer GIF @@ -396,8 +396,8 @@ function display_event($event,$include_date=1) { - for ($i = 0; $i < 7; $i++) { - $days[$i+1] = strftime('%A',mktime(12,0,0,4,$i,2001)); + for ($i = 1; $i <= 7; $i++) { + $days[$i] = strftime('%A',mktime(12,0,0,4,$i,2001)); } $re = array(1=>'First',2=>'Second',3=>'Third',4=>'Fourth',-1=>'Last',-2=>'2nd Last',-3=>'3rd Last'); Index: phpweb/submit-event.php diff -u phpweb/submit-event.php:1.6 phpweb/submit-event.php:1.7 --- phpweb/submit-event.php:1.6 Mon Mar 4 21:56:00 2002 +++ phpweb/submit-event.php Tue Mar 5 14:11:16 2002 @@ -101,12 +101,12 @@ if ($errors) display_errors($errors); -for ($i = 0; $i < 7; $i++) { - $days[$i+1] = strftime('%A',mktime(12,0,0,4,$i,2001)); +for ($i = 1; $i <= 7; $i++) { + $days[$i] = strftime('%A',mktime(12,0,0,4,$i,2001)); } -for ($i = 0; $i < 12; $i++) { - $months[$i+1] = strftime('%B',mktime(12,0,0,$i+1,1,2001)); +for ($i = 1; $i <= 12; $i++) { + $months[$i] = strftime('%B',mktime(12,0,0,$i,1,2001)); } $re = array(1=>'First',2=>'Second',3=>'Third',4=>'Fourth',-1=>'Last',-2=>'2nd Last',-3=>'3rd Last');

« previous php.mirrors (#8981) next »