Coercing a date calc - problem - or am I just dumb tryin g it this way

From: Date: Sat, 21 Jun 2003 13:49:34 +0000
Subject: Coercing a date calc - problem - or am I just dumb tryin g it this way
Groups: php.general 
Request: Send a blank email to php-general+get-152387@lists.php.net to get a copy of this message
Hi all, I've just written this function: $term='Michaelmas'; function f_week($w,$t) { $P=7*($w-1); if( $t == 'Michaelmas'){ $D = 06; $M = 10; $Y = 2003; } else { $D = 12; $M = 01; $Y = 2004; } $week=date("d/m/Y", mktime(0,0,0,$D+$P,$M,$Y)); return $week; } ?> Michaelmas week 4 is <? echo f_week(4,$term) ?> But the date it shows is '10/03/2005 ' rather than '03/10/2003'. Suggestions please. George in Oxford

« previous php.general (#152387) next »