Changeset 2595


Ignore:
Timestamp:
Jan 10, 2012, 6:56:04 AM (8 years ago)
Author:
goya
Message:

refix plots

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/apps/frontend/modules/plot/actions/components.class.php

    r2577 r2595  
    2121      if ($sem >= 52 && date('n', $date) == 1) $sem = 0;
    2222      if ($sem0 >= 52 && $sem <= 1) $sem0 = 0;
    23       $n_weeks = ($annee - $annee0)*53 + $sem - $sem0 + 1;
     23      $n_weeks = ($annee - $annee0)*53 + $sem - $sem0;
    2424#print "$date ; $annee ; $sem ; $last_year ; $annee0 ; $sem0 ; $date_debut ; $n_weeks";
    2525    } else {
     
    134134
    135135 public static function getLabelsSemaines($n_weeks, $annee, $sem) {
    136     if ($sem != 0 && $sem <= 51) $an = $annee + 1;
     136    if ($sem > 1 && $sem <= 51) $an = $annee + 1;
    137137    else $an = $annee;
    138138    $hashmap = array( '3'  => "Jan ".sprintf('%02d', $an-2000), '6'  => " Fév", '10' => " Mar", '15' => "Avr",
Note: See TracChangeset for help on using the changeset viewer.