# HG changeset patch # User Franck Deroche # Date 1193401499 -7200 # Node ID ec1453cb74b864219cc4192a4ebe150add79bd22 # Parent a8710e9731553158454a4606977908438486b7bf Plus brutal, mais fonctionnel. Il semblerait que -1 % 12 retourne -1 en PHP, et pas 11... diff -r a8710e973155 -r ec1453cb74b8 includes/class.skeleton.php --- a/includes/class.skeleton.php Fri Oct 26 13:59:39 2007 +0200 +++ b/includes/class.skeleton.php Fri Oct 26 14:24:59 2007 +0200 @@ -109,7 +109,9 @@ $cYear = $this->calendarYear; $nextMonth = ($cMonth % 12) + 1; $nextYear = ($nextMonth == 1) ? $cYear + 1 : $cYear; - $prevMonth = (($cMonth % 12) - 1) % 12; + $prevMonth = $cMonth - 1; + if($prevMonth == 0) + $prevMonth = 12; $prevYear = ($prevMonth == 12) ? $cYear - 1 : $cYear; $retVal = new Template('calendar.xml'); $retVal->setParams(array(