Salut,

> Tout va bien jusqu'à la partie qui doit définir si c'est un lundi ou un
> jeudi etc.

function  dayofweek($day,$month,$year) {
# computes day of week for any date in the Gregorian calendar
# The returned value will be 0 for a Sunday, 1 for a Monday, ...
# Source : The calendar FAQ
# http://na-tzul.pauahtun.org/CalendarFAQ/

   $a = (int)( ( 14 - $month ) / 12 ) ;
   $y = $year - $a ;
   $m = $month + 12 * $a - 2 ;
   $d = $day + $y + (int)($y/4) - (int)($y/100) + (int)($y/400)
                           + (int)(31*$m/12) ;
   $d = $d % 7 ;
   return $d ;
}


Dom


--
http://www-internal.alphanet.ch/linux-leman/ avant de poser
une question. Ouais, pour se désabonner aussi.

Répondre à