Changeset 429 for trunk/calendar_new/inc


Ignore:
Timestamp:
09/15/08 14:49:45 (16 years ago)
Author:
niltonneto
Message:

Alterações feitas por Alexandre Muller.
Email: amuller@…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/calendar_new/inc/class.uicalendar.inc.php

    r420 r429  
    107107                        $retorno .= "</workday>"; 
    108108                } 
    109                 $currentWeekDay = date('w', mktime()); 
     109                $currentWeekDay = date('w', $dayViewTime); 
    110110 
    111111                for($i = $this->workweekstarts; $i <= $this->workweekends; $i++){ 
    112                         $retorno.= "<workweek><dayid>".date("Ydm", time() - (($currentWeekDay-$i)*60*60*24))."</dayid><dayofweek>".$this->daysofweek[$i]."</dayofweek></workweek>"; 
     112                        $retorno.= "<workweek><dayid>".date("Ydm", $dayViewTime - (($currentWeekDay-$i)*60*60*24))."</dayid><dayofweek>".$this->daysofweek[$i]."</dayofweek></workweek>"; 
    113113                 } 
    114114 
     
    136136                for ($i=1;$i<=date('t');$i+=7){ 
    137137                        $retorno.= "<workWeek>"; 
    138                         $retorno.= "<workday><id>".date('Y').$i.date('m')."0000</id></workday>"; 
    139                         $retorno.= "<workday><id>".date('Y').($i+1).date('m')."0000</id></workday>"; 
    140                         $retorno.= "<workday><id>".date('Y').($i+2).date('m')."0000</id></workday>"; 
    141                         $retorno.= "<workday><id>".date('Y').($i+3).date('m')."0000</id></workday>"; 
    142                         $retorno.= "<workday><id>".date('Y').($i+4).date('m')."0000</id></workday>"; 
    143                         $retorno.= "<workday><id>".date('Y').($i+5).date('m')."0000</id></workday>"; 
    144                         $retorno.= "<workday><id>".(date('Y').$i+6).date('m')."0000</id></workday>"; 
     138                        $retorno.= "<workday><id>".date('Y').($i<10?"0":"").$i.date('m')."0000</id></workday>"; 
     139                        $retorno.= "<workday><id>".date('Y').($i<9?"0":"").($i+1).date('m')."0000</id></workday>"; 
     140                        $retorno.= "<workday><id>".date('Y').($i<8?"0":"").($i+2).date('m')."0000</id></workday>"; 
     141                        $retorno.= "<workday><id>".date('Y').($i<7?"0":"").($i+3).date('m')."0000</id></workday>"; 
     142                        $retorno.= "<workday><id>".date('Y').($i<6?"0":"").($i+4).date('m')."0000</id></workday>"; 
     143                        $retorno.= "<workday><id>".date('Y').($i<5?"0":"").($i+5).date('m')."0000</id></workday>"; 
     144                        $retorno.= "<workday><id>".(date('Y').($i<4?"0":"").$i+6).date('m')."0000</id></workday>"; 
    145145                        $retorno.= "</workWeek>"; 
    146146                } 
Note: See TracChangeset for help on using the changeset viewer.