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



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to