Changeset 3055


Ignore:
Timestamp:
Jan 4, 2013, 5:51:25 AM (8 years ago)
Author:
roux
Message:

fix graphes for 1st week of january

File:
1 edited

Legend:

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

    r2987 r3055  
    2323      $annee0 = date('Y', $last_year); $sem0 = date('W', $last_year);
    2424      if ($sem >= 52 && date('n', $date) == 1) $sem = 0;
    25       if ($sem0 >= 52 && $sem <= 1) $sem0 = 0;
     25      if ($sem0 >= 52 && $sem <= 1) {
     26        $sem0 = 0;
     27        $annee0 += 1;
     28      }
    2629      $n_weeks = ($annee - $annee0)*53 + $sem - $sem0 + 1;
    2730#print "$date ; $annee ; $sem ; $last_year ; $annee0 ; $sem0 ; $date_debut ; $n_weeks";
Note: See TracChangeset for help on using the changeset viewer.