Changeset 2577


Ignore:
Timestamp:
Jan 7, 2012, 6:34:43 PM (8 years ago)
Author:
goya
Message:

last time new year's fix for graphs?

File:
1 edited

Legend:

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

    r2545 r2577  
    2020      $annee0 = date('Y', $last_year); $sem0 = date('W', $last_year);
    2121      if ($sem >= 52 && date('n', $date) == 1) $sem = 0;
     22      if ($sem0 >= 52 && $sem <= 1) $sem0 = 0;
    2223      $n_weeks = ($annee - $annee0)*53 + $sem - $sem0 + 1;
    23 //print "$date ; $annee ; $sem ; $last_year ; $annee0 ; $sem0 ; $date_debut ; $n_weeks";
     24#print "$date ; $annee ; $sem ; $last_year ; $annee0 ; $sem0 ; $date_debut ; $n_weeks";
    2425    } else {
    2526      $query4 = Doctrine_Query::create()
     
    133134
    134135 public static function getLabelsSemaines($n_weeks, $annee, $sem) {
    135     if ($sem <= 51) $an = $annee + 1;
     136    if ($sem != 0 && $sem <= 51) $an = $annee + 1;
    136137    else $an = $annee;
    137138    $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.