phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.6,1


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.6,1.71.2.7 class.socalendar.inc.php,1.22.2.2,1.22.2.3 class.uicalendar.inc.php,1.66.2.15,1.66.2.16 class.socalendar__.inc.php,1.11,1.11.2.1 class.socalendar_sql.inc.php,1.28,1.28.2.1 class.holidaycalc_JP.inc.php,1.1.2.1,1.1.2.2 class.holidaycalc_US.inc.php,1.5.2.2,1.5.2.3
Date: Sun, 23 Jun 2002 16:28:46 -0400

Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv26138

Modified Files:
      Tag: Version-0_9_14-branch
        class.bocalendar.inc.php class.socalendar.inc.php 
        class.uicalendar.inc.php class.socalendar__.inc.php 
        class.socalendar_sql.inc.php class.holidaycalc_JP.inc.php 
        class.holidaycalc_US.inc.php 
Log Message:
GNU Bug #438.  This should standardize all to use the dattime class for 
consistency.

Index: class.bocalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.bocalendar.inc.php,v
retrieving revision 1.71.2.6
retrieving revision 1.71.2.7
diff -C2 -r1.71.2.6 -r1.71.2.7
*** class.bocalendar.inc.php    7 May 2002 00:53:19 -0000       1.71.2.6
--- class.bocalendar.inc.php    23 Jun 2002 20:28:43 -0000      1.71.2.7
***************
*** 98,102 ****
                var $cached_events;
                var $repeating_events;
-               var $datetime;
                var $day;
                var $month;
--- 98,101 ----
***************
*** 221,226 ****
                                )
                        );
!                       $this->datetime = $this->so->datetime;
!                       $localtime = $this->datetime->gmtnow + 
$this->datetime->tz_offset;
                        
                        $date = (isset($GLOBALS['date'])?$GLOBALS['date']:'');
--- 220,224 ----
                                )
                        );
!                       $localtime = 
$GLOBALS['phpgw']->datetime->users_localtime;
                        
                        $date = (isset($GLOBALS['date'])?$GLOBALS['date']:'');
***************
*** 271,275 ****
                        }
  
!                       $this->today = date('Ymd',$this->datetime->gmtnow);
  
                        if($this->debug)
--- 269,273 ----
                        }
  
!                       $this->today = 
date('Ymd',$GLOBALS['phpgw']->datetime->gmtnow);
  
                        if($this->debug)
***************
*** 451,455 ****
                           if($this->owner == $event['owner'])
                           {
!                               $exception_time = 
mktime($event['start']['hour'],$event['start']['min'],0,$param['month'],$param['day'],$param['year'])
 - $this->datetime->tz_offset;
                                $event['recur_exception'][] = 
intval($exception_time);
                                $this->so->cal->event = $event;
--- 449,453 ----
                           if($this->owner == $event['owner'])
                           {
!                               $exception_time = 
mktime($event['start']['hour'],$event['start']['min'],0,$param['month'],$param['day'],$param['year'])
 - $GLOBALS['phpgw']->datetime->tz_offset;
                                $event['recur_exception'][] = 
intval($exception_time);
                                $this->so->cal->event = $event;
***************
*** 956,970 ****
                                $error = 40;
                        }
!                       elseif 
(($this->datetime->time_valid($event['start']['hour'],$event['start']['min'],0) 
== False) || 
($this->datetime->time_valid($event['end']['hour'],$event['end']['min'],0) == 
False))
                        {
                                $error = 41;
                        }
!                       elseif 
(($this->datetime->date_valid($event['start']['year'],$event['start']['month'],$event['start']['mday'])
 == False) || 
($this->datetime->date_valid($event['end']['year'],$event['end']['month'],$event['end']['mday'])
 == False) || 
($this->datetime->date_compare($event['start']['year'],$event['start']['month'],$event['start']['mday'],$event['end']['year'],$event['end']['month'],$event['end']['mday'])
 == 1))
                        {
                                $error = 42;
                        }
!                       elseif 
($this->datetime->date_compare($event['start']['year'],$event['start']['month'],$event['start']['mday'],$event['end']['year'],$event['end']['month'],$event['end']['mday'])
 == 0)
                        {
!                               if 
($this->datetime->time_compare($event['start']['hour'],$event['start']['min'],0,$event['end']['hour'],$event['end']['min'],0)
 == 1)
                                {
                                        $error = 42;
--- 954,968 ----
                                $error = 40;
                        }
!                       elseif 
(($GLOBALS['phpgw']->datetime->time_valid($event['start']['hour'],$event['start']['min'],0)
 == False) || 
($GLOBALS['phpgw']->datetime->time_valid($event['end']['hour'],$event['end']['min'],0)
 == False))
                        {
                                $error = 41;
                        }
!                       elseif 
(($GLOBALS['phpgw']->datetime->date_valid($event['start']['year'],$event['start']['month'],$event['start']['mday'])
 == False) || 
($GLOBALS['phpgw']->datetime->date_valid($event['end']['year'],$event['end']['month'],$event['end']['mday'])
 == False) || 
($GLOBALS['phpgw']->datetime->date_compare($event['start']['year'],$event['start']['month'],$event['start']['mday'],$event['end']['year'],$event['end']['month'],$event['end']['mday'])
 == 1))
                        {
                                $error = 42;
                        }
!                       elseif 
($GLOBALS['phpgw']->datetime->date_compare($event['start']['year'],$event['start']['month'],$event['start']['mday'],$event['end']['year'],$event['end']['month'],$event['end']['mday'])
 == 0)
                        {
!                               if 
($GLOBALS['phpgw']->datetime->time_compare($event['start']['hour'],$event['start']['min'],0,$event['end']['hour'],$event['end']['min'],0)
 == 1)
                                {
                                        $error = 42;
***************
*** 1104,1108 ****
  //                    if($starttime == $endtime && 
$GLOBALS['phpgw']->common->show_date($starttime,'Hi') == 0)
  //                    {
! //                            $endtime = 
mktime(23,59,59,$GLOBALS['phpgw']->common->show_date($starttime,'m'),$GLOBALS['phpgw']->common->show_date($starttime,'d')
 + 1,$GLOBALS['phpgw']->common->show_date($starttime,'Y')) - 
$this->datetime->tz_offset;
  //                    }
  //
--- 1102,1106 ----
  //                    if($starttime == $endtime && 
$GLOBALS['phpgw']->common->show_date($starttime,'Hi') == 0)
  //                    {
! //                            $endtime = 
mktime(23,59,59,$GLOBALS['phpgw']->common->show_date($starttime,'m'),$GLOBALS['phpgw']->common->show_date($starttime,'d')
 + 1,$GLOBALS['phpgw']->common->show_date($starttime,'Y')) - 
$GLOBALS['phpgw']->datetime->tz_offset;
  //                    }
  //
***************
*** 1295,1300 ****
                function get_week_label()
                {
!                       $first = 
$this->datetime->gmtdate($this->datetime->get_weekday_start($this->year, 
$this->month, $this->day));
!                       $last = $this->datetime->gmtdate($first['raw'] + 
518400);
  
  // Week Label
--- 1293,1298 ----
                function get_week_label()
                {
!                       $first = 
$GLOBALS['phpgw']->datetime->gmtdate($GLOBALS['phpgw']->datetime->get_weekday_start($this->year,
 $this->month, $this->day));
!                       $last = 
$GLOBALS['phpgw']->datetime->gmtdate($first['raw'] + 518400);
  
  // Week Label
***************
*** 1398,1402 ****
                        if(isset($event['recur_exception']))
                        {
!                               $event_time = 
mktime($event['start']['hour'],$event['start']['min'],0,intval(substr($date,4,2)),intval(substr($date,6,2)),intval(substr($date,0,4)))
 - $this->datetime->tz_offset;
                                while($inserted == False && 
list($key,$exception_time) = each($event['recur_exception']))
                                {
--- 1396,1400 ----
                        if(isset($event['recur_exception']))
                        {
!                               $event_time = 
mktime($event['start']['hour'],$event['start']['min'],0,intval(substr($date,4,2)),intval(substr($date,6,2)),intval(substr($date,0,4)))
 - $GLOBALS['phpgw']->datetime->tz_offset;
                                while($inserted == False && 
list($key,$exception_time) = each($event['recur_exception']))
                                {
***************
*** 1586,1590 ****
                                                        }
          
!                                                       if 
(($this->datetime->day_of_week($rep_events['start']['year'],$rep_events['start']['month'],$rep_events['start']['mday'])
 == 
$this->datetime->day_of_week($search_date_year,$search_date_month,$search_date_day))
 &&
                                                                
(ceil($rep_events['start']['mday']/7) == ceil($search_date_day/7)))
                                                        {
--- 1584,1588 ----
                                                        }
          
!                                                       if 
(($GLOBALS['phpgw']->datetime->day_of_week($rep_events['start']['year'],$rep_events['start']['month'],$rep_events['start']['mday'])
 == 
$GLOBALS['phpgw']->datetime->day_of_week($search_date_year,$search_date_month,$search_date_day))
 &&
                                                                
(ceil($rep_events['start']['mday']/7) == ceil($search_date_day/7)))
                                                        {
***************
*** 1751,1756 ****
                                        }
                                }
! //                            $edate -= $this->datetime->tz_offset;
! //                            for($date=mktime(0,0,0,$smonth,$sday,$syear) - 
$this->datetime->tz_offset;$date<=$edate;$date += 86400)
                                
for($date=mktime(0,0,0,$smonth,$sday,$syear);$date<=$edate;$date += 86400)
                                {
--- 1749,1754 ----
                                        }
                                }
! //                            $edate -= 
$GLOBALS['phpgw']->datetime->tz_offset;
! //                            for($date=mktime(0,0,0,$smonth,$sday,$syear) - 
$GLOBALS['phpgw']->datetime->tz_offset;$date<=$edate;$date += 86400)
                                
for($date=mktime(0,0,0,$smonth,$sday,$syear);$date<=$edate;$date += 86400)
                                {
***************
*** 1895,1900 ****
                        {
                                $event = $this->cached_events[$fulldate][$k];
!                               $eventstart = 
$this->datetime->localdates($this->maketime($event['start']) - 
$this->datetime->tz_offset);
!                               $eventend = 
$this->datetime->localdates($this->maketime($event['end']) - 
$this->datetime->tz_offset);
                                $start = ($eventstart['hour'] * 10000) + 
($eventstart['minute'] * 100);
                                $starttemp = $this->splittime("$start",False);
--- 1893,1898 ----
                        {
                                $event = $this->cached_events[$fulldate][$k];
!                               $eventstart = 
$GLOBALS['phpgw']->datetime->localdates($this->maketime($event['start']) - 
$GLOBALS['phpgw']->datetime->tz_offset);
!                               $eventend = 
$GLOBALS['phpgw']->datetime->localdates($this->maketime($event['end']) - 
$GLOBALS['phpgw']->datetime->tz_offset);
                                $start = ($eventstart['hour'] * 10000) + 
($eventstart['minute'] * 100);
                                $starttemp = $this->splittime("$start",False);
***************
*** 2059,2068 ****
                        if($old_event != False)
                        {
!                               $old_event_datetime = $t_old_start_time - 
$this->datetime->tz_offset;
                        }
                
                        if($new_event != False)
                        {
!                               $new_event_datetime = 
$this->maketime($new_event['start']) - $this->datetime->tz_offset;
                        }
  
--- 2057,2066 ----
                        if($old_event != False)
                        {
!                               $old_event_datetime = $t_old_start_time - 
$GLOBALS['phpgw']->datetime->tz_offset;
                        }
                
                        if($new_event != False)
                        {
!                               $new_event_datetime = 
$this->maketime($new_event['start']) - $GLOBALS['phpgw']->datetime->tz_offset;
                        }
  
***************
*** 2173,2177 ****
                        $t_appt['min']  = 
$GLOBALS['phpgw']->common->show_date($starttime,'i');
                        $t_appt['sec']  = 0;
!                       $t_time = $this->maketime($t_appt) - 
$this->datetime->tz_offset;
                        $y_time = $t_time - 86400;
                        $tt_time = $t_time + 86399;
--- 2171,2175 ----
                        $t_appt['min']  = 
$GLOBALS['phpgw']->common->show_date($starttime,'i');
                        $t_appt['sec']  = 0;
!                       $t_time = $this->maketime($t_appt) - 
$GLOBALS['phpgw']->datetime->tz_offset;
                        $y_time = $t_time - 86400;
                        $tt_time = $t_time + 86399;

Index: class.socalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.socalendar.inc.php,v
retrieving revision 1.22.2.2
retrieving revision 1.22.2.3
diff -C2 -r1.22.2.2 -r1.22.2.3
*** class.socalendar.inc.php    7 May 2002 00:53:19 -0000       1.22.2.2
--- class.socalendar.inc.php    23 Jun 2002 20:28:43 -0000      1.22.2.3
***************
*** 31,35 ****
                {
                        $this->db = $GLOBALS['phpgw']->db;
!                       $this->datetime = CreateObject('phpgwapi.datetime');
  
                        $this->owner = (!isset($param['owner']) || 
$param['owner'] == 
0?$GLOBALS['phpgw_info']['user']['account_id']:$param['owner']);
--- 31,38 ----
                {
                        $this->db = $GLOBALS['phpgw']->db;
!                       if(!is_object($GLOBALS['phpgw']->datetime))
!                       {
!                               $GLOBALS['phpgw']->datetime = 
createobject('phpgwapi.datetime');
!                       }
  
                        $this->owner = (!isset($param['owner']) || 
$param['owner'] == 
0?$GLOBALS['phpgw_info']['user']['account_id']:$param['owner']);
***************
*** 72,80 ****
                        if($owner_id)
                        {
!                               return 
$this->cal->list_events($startYear,$startMonth,$startDay,$endYear,$endMonth,$endDay,$extra,$this->datetime->tz_offset,$owner_id);
                        }
                        else
                        {
!                               return 
$this->cal->list_events($startYear,$startMonth,$startDay,$endYear,$endMonth,$endDay,$extra,$this->datetime->tz_offset);
                        }
                }
--- 75,83 ----
                        if($owner_id)
                        {
!                               return 
$this->cal->list_events($startYear,$startMonth,$startDay,$endYear,$endMonth,$endDay,$extra,$GLOBALS['phpgw']->datetime->tz_offset,$owner_id);
                        }
                        else
                        {
!                               return 
$this->cal->list_events($startYear,$startMonth,$startDay,$endYear,$endMonth,$endDay,$extra,$GLOBALS['phpgw']->datetime->tz_offset);
                        }
                }
***************
*** 87,92 ****
                        }
  
!                       $starttime = mktime(0,0,0,$smonth,$sday,$syear) - 
$this->datetime->tz_offset;
!                       $endtime = mktime(23,59,59,$emonth,$eday,$eyear) - 
$this->datetime->tz_offset;
  //                    $starttime = mktime(0,0,0,$smonth,$sday,$syear);
  //                    $endtime = mktime(23,59,59,$emonth,$eday,$eyear);
--- 90,95 ----
                        }
  
!                       $starttime = mktime(0,0,0,$smonth,$sday,$syear) - 
$GLOBALS['phpgw']->datetime->tz_offset;
!                       $endtime = mktime(23,59,59,$emonth,$eday,$eyear) - 
$GLOBALS['phpgw']->datetime->tz_offset;
  //                    $starttime = mktime(0,0,0,$smonth,$sday,$syear);
  //                    $endtime = mktime(23,59,59,$emonth,$eday,$eyear);

Index: class.uicalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.66.2.15
retrieving revision 1.66.2.16
diff -C2 -r1.66.2.15 -r1.66.2.16
*** class.uicalendar.inc.php    15 May 2002 13:17:36 -0000      1.66.2.15
--- class.uicalendar.inc.php    23 Jun 2002 20:28:43 -0000      1.66.2.16
***************
*** 30,35 ****
  
                var $cat_id;
-               var $datetime;
-               var $tz_offset;
                var $theme;
                var $link_tpl;
--- 30,33 ----
***************
*** 70,75 ****
  
                        $this->bo = CreateObject('calendar.bocalendar',1);
-                       $this->datetime = $this->bo->datetime;
-                       $this->tz_offset = $this->datetime->tz_offset;
  
                        if($this->debug)
--- 68,71 ----
***************
*** 144,148 ****
                        $this->bo->read_holidays($params['year']);
  
!                       $date = 
$this->datetime->makegmttime(0,0,0,$params['month'],$params['day'],$params['year']);
                        $month_ago = 
intval(date('Ymd',mktime(0,0,0,$params['month'] - 
1,$params['day'],$params['year'])));
                        $month_ahead = 
intval(date('Ymd',mktime(0,0,0,$params['month'] + 
1,$params['day'],$params['year'])));
--- 140,144 ----
                        $this->bo->read_holidays($params['year']);
  
!                       $date = 
$GLOBALS['phpgw']->datetime->makegmttime(0,0,0,$params['month'],$params['day'],$params['year']);
                        $month_ago = 
intval(date('Ymd',mktime(0,0,0,$params['month'] - 
1,$params['day'],$params['year'])));
                        $month_ahead = 
intval(date('Ymd',mktime(0,0,0,$params['month'] + 
1,$params['day'],$params['year'])));
***************
*** 150,154 ****
                        $monthend = 
intval(date('Ymd',mktime(0,0,0,$params['month'] + 1,0,$params['year'])));
  
!                       $weekstarttime = 
$this->datetime->get_weekday_start($params['year'],$params['month'],1);
  
                        if($this->debug)
--- 146,150 ----
                        $monthend = 
intval(date('Ymd',mktime(0,0,0,$params['month'] + 1,0,$params['year'])));
  
!                       $weekstarttime = 
$GLOBALS['phpgw']->datetime->get_weekday_start($params['year'],$params['month'],1);
  
                        if($this->debug)
***************
*** 221,235 ****
                        {
                                $var = Array(
!                                       'dayname'       => '<b>' . 
substr(lang($this->datetime->days[$i]),0,2) . '</b>',
                                        'day_image'     => ''
                                );
                                
$this->output_template_array($p,'daynames','mini_day',$var);
                        }
!                       $today = date('Ymd',$this->datetime->gmtnow + 
$this->tz_offset);
                        unset($date);
!                       for($i=$weekstarttime + 
$this->tz_offset;date('Ymd',$i)<=$monthend;$i += (24 * 3600 * 7))
                        {
                                unset($var);
!                               $daily = $this->set_week_array($i - 
$this->tz_offset,$cellcolor,$weekly);
                                @reset($daily);
                                while(list($date,$day_params) = each($daily))
--- 217,231 ----
                        {
                                $var = Array(
!                                       'dayname'       => '<b>' . 
substr(lang($GLOBALS['phpgw']->datetime->days[$i]),0,2) . '</b>',
                                        'day_image'     => ''
                                );
                                
$this->output_template_array($p,'daynames','mini_day',$var);
                        }
!                       $today = 
date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime);
                        unset($date);
!                       for($i=$weekstarttime + 
$GLOBALS['phpgw']->datetime->tz_offset;date('Ymd',$i)<=$monthend;$i += (24 * 
3600 * 7))
                        {
                                unset($var);
!                               $daily = $this->set_week_array($i - 
$GLOBALS['phpgw']->datetime->tz_offset,$cellcolor,$weekly);
                                @reset($daily);
                                while(list($date,$day_params) = each($daily))
***************
*** 395,400 ****
                        $this->bo->read_holidays();
  
!                       $next = 
$this->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day + 
7,$this->bo->year);
!                       $prev = 
$this->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day - 
7,$this->bo->year);
  
                        if (!$this->bo->printer_friendly || 
($this->bo->printer_friendly && 
@$this->bo->prefs['calendar']['display_minicals']))
--- 391,396 ----
                        $this->bo->read_holidays();
  
!                       $next = 
$GLOBALS['phpgw']->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day 
+ 7,$this->bo->year);
!                       $prev = 
$GLOBALS['phpgw']->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day 
- 7,$this->bo->year);
  
                        if (!$this->bo->printer_friendly || 
($this->bo->printer_friendly && 
@$this->bo->prefs['calendar']['display_minicals']))
***************
*** 518,523 ****
                        }
  
!                       $now    = $this->datetime->makegmttime(0, 0, 0, 
$this->bo->month, $this->bo->day, $this->bo->year);
!                       $now['raw'] += $this->tz_offset;
                        $m = mktime(0,0,0,$this->bo->month,1,$this->bo->year);
  
--- 514,519 ----
                        }
  
!                       $now    = $GLOBALS['phpgw']->datetime->makegmttime(0, 
0, 0, $this->bo->month, $this->bo->day, $this->bo->year);
!                       $now['raw'] += $GLOBALS['phpgw']->datetime->tz_offset;
                        $m = mktime(0,0,0,$this->bo->month,1,$this->bo->year);
  
***************
*** 663,667 ****
                        $this->bo->cached_events = Array();
                        $this->bo->repeating_events[0] = $event;
!                       $datetime = 
mktime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year) - 
$this->tz_offset;
                        $this->bo->check_repeating_events($datetime);
                        $check_date = 
$GLOBALS['phpgw']->common->show_date($datetime,'Ymd');
--- 659,663 ----
                        $this->bo->cached_events = Array();
                        $this->bo->repeating_events[0] = $event;
!                       $datetime = 
mktime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year) - 
$GLOBALS['phpgw']->datetime->tz_offset;
                        $this->bo->check_repeating_events($datetime);
                        $check_date = 
$GLOBALS['phpgw']->common->show_date($datetime,'Ymd');
***************
*** 1170,1175 ****
                        }
  
!                       $now    = $this->datetime->makegmttime(0, 0, 0, 
$this->bo->month, $this->bo->day, $this->bo->year);
!                       $now['raw'] += $this->tz_offset;
                        $m = mktime(0,0,0,$this->bo->month,1,$this->bo->year);
  
--- 1166,1171 ----
                        }
  
!                       $now    = $GLOBALS['phpgw']->datetime->makegmttime(0, 
0, 0, $this->bo->month, $this->bo->day, $this->bo->year);
!                       $now['raw'] += $GLOBALS['phpgw']->datetime->tz_offset;
                        $m = mktime(0,0,0,$this->bo->month,1,$this->bo->year);
  
***************
*** 1228,1232 ****
                        }
  
!                       $freetime = 
$this->datetime->localdates(mktime(0,0,0,$event['start']['month'],$event['start']['mday'],$event['start']['year'])
 - $this->tz_offset);
                        echo $this->timematrix(
                                Array(
--- 1224,1228 ----
                        }
  
!                       $freetime = 
$GLOBALS['phpgw']->datetime->localdates(mktime(0,0,0,$event['start']['month'],$event['start']['mday'],$event['start']['year'])
 - $GLOBALS['phpgw']->datetime->tz_offset);
                        echo $this->timematrix(
                                Array(
***************
*** 1287,1293 ****
                        );
  
!                       $startdate = 
mktime(0,0,0,$this->bo->month,1,$this->bo->year) - $this->tz_offset;
!                       $days = 
$this->datetime->days_in_month($this->bo->month,$this->bo->year);
!                       $enddate   = 
mktime(23,59,59,$this->bo->month,$this->bo->days,$this->bo->year) - 
$this->tz_offset;
  
                        $header[] = lang(\'Category\');
--- 1283,1289 ----
                        );
  
!                       $startdate = 
mktime(0,0,0,$this->bo->month,1,$this->bo->year) - 
$GLOBALS['phpgw']->datetime->tz_offset;
!                       $days = 
$GLOBALS['phpgw']->datetime->days_in_month($this->bo->month,$this->bo->year);
!                       $enddate   = 
mktime(23,59,59,$this->bo->month,$this->bo->days,$this->bo->year) - 
$GLOBALS['phpgw']->datetime->tz_offset;
  
                        $header[] = lang(\'Category\');
***************
*** 1455,1459 ****
                function matrixselect()
                {
!                       $datetime = 
mktime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year) - 
$this->tz_offset;
  
                        $sb = CreateObject('phpgwapi.sbox');
--- 1451,1455 ----
                function matrixselect()
                {
!                       $datetime = 
mktime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year) - 
$GLOBALS['phpgw']->datetime->tz_offset;
  
                        $sb = CreateObject('phpgwapi.sbox');
***************
*** 1618,1622 ****
                        {
                                case 'free/busy':
!                                       $freetime = 
$this->datetime->gmtdate(mktime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year));
                                        echo $this->timematrix(
                                                Array(
--- 1614,1618 ----
                        {
                                case 'free/busy':
!                                       $freetime = 
$GLOBALS['phpgw']->datetime->gmtdate(mktime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year));
                                        echo $this->timematrix(
                                                Array(
***************
*** 1691,1695 ****
                                $event = $this->bo->read_entry($id);
                                
!                               $datetime = 
$this->bo->maketime($event['start']) - $this->tz_offset;
                                
                                $ids[strval($event['id'])]++;
--- 1687,1691 ----
                                $event = $this->bo->read_entry($id);
                                
!                               $datetime = 
$this->bo->maketime($event['start']) - $GLOBALS['phpgw']->datetime->tz_offset;
                                
                                $ids[strval($event['id'])]++;
***************
*** 1885,1890 ****
  
                        unset($thisdate);
!                       $thisdate = 
mktime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year) - 
$this->tz_offset;
!                       $sun = 
$this->datetime->get_weekday_start($this->bo->year,$this->bo->month,$this->bo->day)
 - $this->tz_offset;
  
                        $str = '';
--- 1881,1886 ----
  
                        unset($thisdate);
!                       $thisdate = 
mktime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year) - 
$GLOBALS['phpgw']->datetime->tz_offset;
!                       $sun = 
$GLOBALS['phpgw']->datetime->get_weekday_start($this->bo->year,$this->bo->month,$this->bo->day)
 - $GLOBALS['phpgw']->datetime->tz_offset;
  
                        $str = '';
***************
*** 1990,1998 ****
                        $editable = ((!$this->bo->printer_friendly) && 
(($is_private && $this->bo->check_perms(PHPGW_ACL_PRIVATE,$event['owner'])) || 
!$is_private));
  
!                       $starttime = $this->bo->maketime($event['start']) - 
$this->tz_offset;
!                       $endtime = $this->bo->maketime($event['end']) - 
$this->tz_offset;
                        $rawdate = mktime(0,0,0,$month,$day,$year);
!                       $rawdate_offset = $rawdate - $this->tz_offset;
!                       $nextday = mktime(0,0,0,$month,$day + 1,$year) - 
$this->tz_offset;
                        if 
(intval($GLOBALS['phpgw']->common->show_date($starttime,'Hi')) && $starttime == 
$endtime)
                        {
--- 1986,1994 ----
                        $editable = ((!$this->bo->printer_friendly) && 
(($is_private && $this->bo->check_perms(PHPGW_ACL_PRIVATE,$event['owner'])) || 
!$is_private));
  
!                       $starttime = $this->bo->maketime($event['start']) - 
$GLOBALS['phpgw']->datetime->tz_offset;
!                       $endtime = $this->bo->maketime($event['end']) - 
$GLOBALS['phpgw']->datetime->tz_offset;
                        $rawdate = mktime(0,0,0,$month,$day,$year);
!                       $rawdate_offset = $rawdate - 
$GLOBALS['phpgw']->datetime->tz_offset;
!                       $nextday = mktime(0,0,0,$month,$day + 1,$year) - 
$GLOBALS['phpgw']->datetime->tz_offset;
                        if 
(intval($GLOBALS['phpgw']->common->show_date($starttime,'Hi')) && $starttime == 
$endtime)
                        {
***************
*** 2016,2020 ****
                                if($endtime >= ($rawdate_offset + 86400))
                                {
!                                       $end_time = 
$GLOBALS['phpgw']->common->show_date(mktime(23,59,59,$month,$day,$year) - 
$this->tz_offset,$this->bo->users_timeformat);
                                }
                                else
--- 2012,2016 ----
                                if($endtime >= ($rawdate_offset + 86400))
                                {
!                                       $end_time = 
$GLOBALS['phpgw']->common->show_date(mktime(23,59,59,$month,$day,$year) - 
$GLOBALS['phpgw']->datetime->tz_offset,$this->bo->users_timeformat);
                                }
                                else
***************
*** 2144,2149 ****
                        $year = $event['start']['year'];
  
!                       $start = 
mktime($event['start']['hour'],$event['start']['min'],$event['start']['sec'],$month,$mday,$year)
 - $this->tz_offset;
!                       $end = $this->bo->maketime($event['end']) - 
$this->tz_offset;
  
                        $overlap = '';
--- 2140,2145 ----
                        $year = $event['start']['year'];
  
!                       $start = 
mktime($event['start']['hour'],$event['start']['min'],$event['start']['sec'],$month,$mday,$year)
 - $GLOBALS['phpgw']->datetime->tz_offset;
!                       $end = $this->bo->maketime($event['end']) - 
$GLOBALS['phpgw']->datetime->tz_offset;
  
                        $overlap = '';
***************
*** 2249,2253 ****
                function week_header($month,$year,$display_name = False)
                {
!                       $this->weekstarttime = 
$this->datetime->get_weekday_start($year,$month,1);
  
                        $p = 
CreateObject('phpgwapi.Template',$this->template_dir);
--- 2245,2249 ----
                function week_header($month,$year,$display_name = False)
                {
!                       $this->weekstarttime = 
$GLOBALS['phpgw']->datetime->get_weekday_start($year,$month,1);
  
                        $p = 
CreateObject('phpgwapi.Template',$this->template_dir);
***************
*** 2284,2288 ****
                        for($i=0;$i<7;$i++)
                        {
!                               
$p->set_var('col_title',lang($this->datetime->days[$i]));
                                $p->parse('column_header','column_title',True);
                        }
--- 2280,2284 ----
                        for($i=0;$i<7;$i++)
                        {
!                               
$p->set_var('col_title',lang($GLOBALS['phpgw']->datetime->days[$i]));
                                $p->parse('column_header','column_title',True);
                        }
***************
*** 2321,2326 ****
                                $p->set_var('col_width','12');
                        }
!                       $today = date('Ymd',$this->datetime->gmtnow + 
$this->tz_offset);
!                       $daily = $this->set_week_array($startdate - 
$this->tz_offset,$cellcolor,$weekly);
                        @reset($daily);
                        while(list($date,$day_params) = each($daily))
--- 2317,2322 ----
                                $p->set_var('col_width','12');
                        }
!                       $today = 
date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime);
!                       $daily = $this->set_week_array($startdate - 
$GLOBALS['phpgw']->datetime->tz_offset,$cellcolor,$weekly);
                        @reset($daily);
                        while(list($date,$day_params) = each($daily))
***************
*** 2411,2415 ****
                        if($this->debug)
                        {
!                               echo '<!-- datetime:gmtdate = 
'.$this->datetime->cv_gmtdate.' -->'."\n";
                        }
  
--- 2407,2411 ----
                        if($this->debug)
                        {
!                               echo '<!-- datetime:gmtdate = 
'.$GLOBALS['phpgw']->datetime->cv_gmtdate.' -->'."\n";
                        }
  
***************
*** 2425,2429 ****
                        $monthend   = intval(date('Ymd',mktime(0,0,0,$month + 
1,0,$year)));
  
!                       $start = $this->datetime->get_weekday_start($year, 
$month, 1);
  
                        if($this->debug)
--- 2421,2425 ----
                        $monthend   = intval(date('Ymd',mktime(0,0,0,$month + 
1,0,$year)));
  
!                       $start = 
$GLOBALS['phpgw']->datetime->get_weekday_start($year, $month, 1);
  
                        if($this->debug)
***************
*** 2453,2457 ****
                        $cellcolor = $this->theme['row_on'];
  
!                       for ($i=intval($start + 
$this->tz_offset);intval(date('Ymd',$i)) <= $monthend;$i += 604800)
                        {
                                $cellcolor = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($cellcolor);
--- 2449,2453 ----
                        $cellcolor = $this->theme['row_on'];
  
!                       for ($i=intval($start + 
$GLOBALS['phpgw']->datetime->tz_offset);intval(date('Ymd',$i)) <= $monthend;$i 
+= 604800)
                        {
                                $cellcolor = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($cellcolor);
***************
*** 2488,2492 ****
                        $p->set_block('week','event','event');
                
!                       $start = $this->datetime->get_weekday_start($year, 
$month, $day) + $this->tz_offset;
  
                        $cellcolor = $this->theme['row_off'];
--- 2484,2488 ----
                        $p->set_block('week','event','event');
                
!                       $start = 
$GLOBALS['phpgw']->datetime->get_weekday_start($year, $month, $day) + 
$GLOBALS['phpgw']->datetime->tz_offset;
  
                        $cellcolor = $this->theme['row_off'];
***************
*** 2514,2518 ****
                        $this->output_template_array($p,'row','event',$var);
  
!                       $tstart = $start - $this->tz_offset;
                        $tstop = $tstart + 604800;
                        $original_owner = $this->bo->so->owner;
--- 2510,2514 ----
                        $this->output_template_array($p,'row','event',$var);
  
!                       $tstart = $start - 
$GLOBALS['phpgw']->datetime->tz_offset;
                        $tstop = $tstart + 604800;
                        $original_owner = $this->bo->so->owner;
***************
*** 2624,2633 ****
                        $var[] = Array(
                                'field' => lang('Start Date/Time'),
!                               'data'  => 
$GLOBALS['phpgw']->common->show_date($this->bo->maketime($event['start']) - 
$this->tz_offset)
                        );
        
                        $var[] = Array(
                                'field' => lang('End Date/Time'),
!                               'data'  => 
$GLOBALS['phpgw']->common->show_date($this->bo->maketime($event['end']) - 
$this->tz_offset)
                        );
  
--- 2620,2629 ----
                        $var[] = Array(
                                'field' => lang('Start Date/Time'),
!                               'data'  => 
$GLOBALS['phpgw']->common->show_date($this->bo->maketime($event['start']) - 
$GLOBALS['phpgw']->datetime->tz_offset)
                        );
        
                        $var[] = Array(
                                'field' => lang('End Date/Time'),
!                               'data'  => 
$GLOBALS['phpgw']->common->show_date($this->bo->maketime($event['end']) - 
$GLOBALS['phpgw']->datetime->tz_offset)
                        );
  
***************
*** 2644,2648 ****
                        $var[] = Array(
                                'field' => lang('Updated'),
!                               'data'  => 
$GLOBALS['phpgw']->common->show_date($this->bo->maketime($event['modtime']) - 
$this->tz_offset)
                        );
  
--- 2640,2644 ----
                        $var[] = Array(
                                'field' => lang('Updated'),
!                               'data'  => 
$GLOBALS['phpgw']->common->show_date($this->bo->maketime($event['modtime']) - 
$GLOBALS['phpgw']->datetime->tz_offset)
                        );
  
***************
*** 2701,2705 ****
                                        if($recur_end != 0)
                                        {
!                                               $recur_end -= $this->tz_offset;
                                                $str_extra .= lang('ends').': 
'.lang($GLOBALS['phpgw']->common->show_date($recur_end,'l')).', 
'.lang($GLOBALS['phpgw']->common->show_date($recur_end,'F')).' 
'.$GLOBALS['phpgw']->common->show_date($recur_end,'d, Y').' ';
                                        }
--- 2697,2701 ----
                                        if($recur_end != 0)
                                        {
!                                               $recur_end -= 
$GLOBALS['phpgw']->datetime->tz_offset;
                                                $str_extra .= lang('ends').': 
'.lang($GLOBALS['phpgw']->common->show_date($recur_end,'l')).', 
'.lang($GLOBALS['phpgw']->common->show_date($recur_end,'F')).' 
'.$GLOBALS['phpgw']->common->show_date($recur_end,'d, Y').' ';
                                        }
***************
*** 2870,2874 ****
                        $time = Array();
  
!                       $daily = 
$this->set_week_array($this->datetime->get_weekday_start($params['year'],$params['month'],$params['day']),$this->theme['row_on'],True);
                        if($this->debug)
                        {
--- 2866,2870 ----
                        $time = Array();
  
!                       $daily = 
$this->set_week_array($GLOBALS['phpgw']->datetime->get_weekday_start($params['year'],$params['month'],$params['day']),$this->theme['row_on'],True);
                        if($this->debug)
                        {
***************
*** 2988,2992 ****
                                        if($this->debug)
                                        {
!                                               echo '<!-- Time : 
'.$GLOBALS['phpgw']->common->show_date($this->bo->maketime($events[$i]['start'])
 - $this->tz_offset).' - 
'.$GLOBALS['phpgw']->common->show_date($this->bo->maketime($events[$i]['end']) 
- $this->tz_offset).' : Start : '.$ind.' : Interval # : '.$interval_start.' 
-->'."\n";
                                        }
                                }
--- 2984,2988 ----
                                        if($this->debug)
                                        {
!                                               echo '<!-- Time : 
'.$GLOBALS['phpgw']->common->show_date($this->bo->maketime($events[$i]['start'])
 - $GLOBALS['phpgw']->datetime->tz_offset).' - 
'.$GLOBALS['phpgw']->common->show_date($this->bo->maketime($events[$i]['end']) 
- $GLOBALS['phpgw']->datetime->tz_offset).' : Start : '.$ind.' : Interval # : 
'.$interval_start.' -->'."\n";
                                        }
                                }
***************
*** 3381,3385 ****
  
  // Date
!                       $start = $this->bo->maketime($event['start']) - 
$this->tz_offset;
                        $var[] = Array(
                                'field' => lang('Start Date'),
--- 3377,3381 ----
  
  // Date
!                       $start = $this->bo->maketime($event['start']) - 
$GLOBALS['phpgw']->datetime->tz_offset;
                        $var[] = Array(
                                'field' => lang('Start Date'),
***************
*** 3403,3407 ****
  
  // End Date
!                       $end = $this->bo->maketime($event['end']) - 
$this->tz_offset;
                        $var[] = Array(
                                'field' => lang('End Date'),
--- 3399,3403 ----
  
  // End Date
!                       $end = $this->bo->maketime($event['end']) - 
$GLOBALS['phpgw']->datetime->tz_offset;
                        $var[] = Array(
                                'field' => lang('End Date'),
***************
*** 3514,3523 ****
                        {
                                $checked = ' checked';
!                               $recur_end = 
$this->bo->maketime($event['recur_enddate']) - $this->tz_offset;
                        }
                        else
                        {
                                $checked = '';
!                               $recur_end = 
$this->bo->maketime($event['start']) + 86400 - $this->tz_offset;
                        }
        
--- 3510,3519 ----
                        {
                                $checked = ' checked';
!                               $recur_end = 
$this->bo->maketime($event['recur_enddate']) - 
$GLOBALS['phpgw']->datetime->tz_offset;
                        }
                        else
                        {
                                $checked = '';
!                               $recur_end = 
$this->bo->maketime($event['start']) + 86400 - 
$GLOBALS['phpgw']->datetime->tz_offset;
                        }
        

Index: class.socalendar__.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.socalendar__.inc.php,v
retrieving revision 1.11
retrieving revision 1.11.2.1
diff -C2 -r1.11 -r1.11.2.1
*** class.socalendar__.inc.php  18 Nov 2001 23:01:09 -0000      1.11
--- class.socalendar__.inc.php  23 Jun 2002 20:28:43 -0000      1.11.2.1
***************
*** 64,68 ****
        var $user;
        var $users_status;
-       var $datetime;
        var $debug = False;
  //    var $debug = True;
--- 64,67 ----
***************
*** 70,74 ****
        function socalendar__()
        {
-               $this->datetime = CreateObject('phpgwapi.datetime');
        }
  
--- 69,72 ----

Index: class.socalendar_sql.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.socalendar_sql.inc.php,v
retrieving revision 1.28
retrieving revision 1.28.2.1
diff -C2 -r1.28 -r1.28.2.1
*** class.socalendar_sql.inc.php        10 Jan 2002 02:15:33 -0000      1.28
--- class.socalendar_sql.inc.php        23 Jun 2002 20:28:43 -0000      1.28.2.1
***************
*** 130,140 ****
                //Legacy Support (New)
  
!                       $datetime = 
$this->datetime->localdates($this->stream->f('datetime'));
                        
$this->set_start($datetime['year'],$datetime['month'],$datetime['day'],$datetime['hour'],$datetime['minute'],$datetime['second']);
  
!                       $datetime = 
$this->datetime->localdates($this->stream->f('mdatetime'));
                        
$this->set_date('modtime',$datetime['year'],$datetime['month'],$datetime['day'],$datetime['hour'],$datetime['minute'],$datetime['second']);
  
!                       $datetime = 
$this->datetime->localdates($this->stream->f('edatetime'));
                        
$this->set_end($datetime['year'],$datetime['month'],$datetime['day'],$datetime['hour'],$datetime['minute'],$datetime['second']);
  
--- 130,140 ----
                //Legacy Support (New)
  
!                       $datetime = 
$GLOBALS['phpgw']->datetime->localdates($this->stream->f('datetime'));
                        
$this->set_start($datetime['year'],$datetime['month'],$datetime['day'],$datetime['hour'],$datetime['minute'],$datetime['second']);
  
!                       $datetime = 
$GLOBALS['phpgw']->datetime->localdates($this->stream->f('mdatetime'));
                        
$this->set_date('modtime',$datetime['year'],$datetime['month'],$datetime['day'],$datetime['hour'],$datetime['minute'],$datetime['second']);
  
!                       $datetime = 
$GLOBALS['phpgw']->datetime->localdates($this->stream->f('edatetime'));
                        
$this->set_end($datetime['year'],$datetime['month'],$datetime['day'],$datetime['hour'],$datetime['minute'],$datetime['second']);
  
***************
*** 160,164 ****
                                if($enddate != 0 && $enddate != Null)
                                {
!                                       $datetime = 
$this->datetime->localdates($enddate);
                                        
$this->add_attribute('recur_enddate',$datetime['year'],'year');
                                        
$this->add_attribute('recur_enddate',$datetime['month'],'month');
--- 160,164 ----
                                if($enddate != 0 && $enddate != Null)
                                {
!                                       $datetime = 
$GLOBALS['phpgw']->datetime->localdates($enddate);
                                        
$this->add_attribute('recur_enddate',$datetime['year'],'year');
                                        
$this->add_attribute('recur_enddate',$datetime['month'],'month');
***************
*** 460,466 ****
                }
  
!               $date = $this->maketime($event['start']) - 
$this->datetime->tz_offset;
!               $enddate = $this->maketime($event['end']) - 
$this->datetime->tz_offset;
!               $today = time() - $this->datetime->tz_offset;
  
                if($event['recur_type'] != MCAL_RECUR_NONE)
--- 460,466 ----
                }
  
!               $date = $this->maketime($event['start']) - 
$GLOBALS['phpgw']->datetime->tz_offset;
!               $enddate = $this->maketime($event['end']) - 
$GLOBALS['phpgw']->datetime->tz_offset;
!               $today = time() - $GLOBALS['phpgw']->datetime->tz_offset;
  
                if($event['recur_type'] != MCAL_RECUR_NONE)
***************
*** 508,512 ****
                        if($event['recur_enddate']['month'] != 0 && 
$event['recur_enddate']['mday'] != 0 && $event['recur_enddate']['year'] != 0)
                        {
!                               $end = $this->maketime($event['recur_enddate']) 
- $this->datetime->tz_offset;
                        }
                        else
--- 508,512 ----
                        if($event['recur_enddate']['month'] != 0 && 
$event['recur_enddate']['mday'] != 0 && $event['recur_enddate']['year'] != 0)
                        {
!                               $end = $this->maketime($event['recur_enddate']) 
- $GLOBALS['phpgw']->datetime->tz_offset;
                        }
                        else

Index: class.holidaycalc_JP.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.holidaycalc_JP.inc.php,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** class.holidaycalc_JP.inc.php        16 Apr 2002 15:45:50 -0000      1.1.2.1
--- class.holidaycalc_JP.inc.php        23 Jun 2002 20:28:43 -0000      1.1.2.2
***************
*** 16,20 ****
  class holidaycalc {
  
!       function calculate_date($holiday, &$holidays, $year, $datetime, &$i)
        {
  
--- 16,20 ----
  class holidaycalc {
  
!       function calculate_date($holiday, &$holidays, $year, &$i)
        {
  
***************
*** 25,29 ****
                        if ($year >= 2000)
                        {
!                               $dow = $datetime->day_of_week($year, 
$holiday['month'], 1);
                                $dayshift = (($holiday['dow'] + 7) - $dow) % 7;
                                $day = ($holiday['occurence'] - 1) * 7 + 
$dayshift + 1;
--- 25,29 ----
                        if ($year >= 2000)
                        {
!                               $dow = 
$GLOBALS['phpgw']->datetime->day_of_week($year, $holiday['month'], 1);
                                $dayshift = (($holiday['dow'] + 7) - $dow) % 7;
                                $day = ($holiday['occurence'] - 1) * 7 + 
$dayshift + 1;
***************
*** 82,86 ****
                if($holiday['observance_rule'] == True)
                {
!                       $dow = 
$datetime->day_of_week($year,$holiday['month'],$day);
                        // This now calulates Observed holidays and creates a 
new entry for them.
                        if($dow == 0)
--- 82,86 ----
                if($holiday['observance_rule'] == True)
                {
!                       $dow = 
$GLOBALS['phpgw']->datetime->day_of_week($year,$holiday['month'],$day);
                        // This now calulates Observed holidays and creates a 
new entry for them.
                        if($dow == 0)

Index: class.holidaycalc_US.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.holidaycalc_US.inc.php,v
retrieving revision 1.5.2.2
retrieving revision 1.5.2.3
diff -C2 -r1.5.2.2 -r1.5.2.3
*** class.holidaycalc_US.inc.php        16 Apr 2002 15:45:50 -0000      1.5.2.2
--- class.holidaycalc_US.inc.php        23 Jun 2002 20:28:43 -0000      1.5.2.3
***************
*** 16,20 ****
  class holidaycalc {
  
!       function calculate_date($holiday, &$holidays, $year, $datetime, &$i)
        {
  //            if($holiday['day'] == 0 && $holiday['dow'] != 0 && 
$holiday['occurence'] != 0)
--- 16,20 ----
  class holidaycalc {
  
!       function calculate_date($holiday, &$holidays, $year, &$i)
        {
  //            if($holiday['day'] == 0 && $holiday['dow'] != 0 && 
$holiday['occurence'] != 0)
***************
*** 23,27 ****
                        if($holiday['occurence'] != 99)
                        {
!                               $dow = 
$datetime->day_of_week($year,$holiday['month'],1);
                                $day = (((7 * $holiday['occurence']) - 6) + 
((($holiday['dow'] + 7) - $dow) % 7));
                                $day += ($day < 1 ? 7 : 0);
--- 23,27 ----
                        if($holiday['occurence'] != 99)
                        {
!                               $dow = 
$GLOBALS['phpgw']->datetime->day_of_week($year,$holiday['month'],1);
                                $day = (((7 * $holiday['occurence']) - 6) + 
((($holiday['dow'] + 7) - $dow) % 7));
                                $day += ($day < 1 ? 7 : 0);
***************
*** 32,36 ****
                                // Sometimes the 5th occurance of a weekday (ie 
the 5th monday)
                                // can spill over to the next month.  This 
prevents that.  
!                               $ld = 
$datetime->days_in_month($holiday['month'],$year);
                                if ($day > $ld)
                                {
--- 32,36 ----
                                // Sometimes the 5th occurance of a weekday (ie 
the 5th monday)
                                // can spill over to the next month.  This 
prevents that.  
!                               $ld = 
$GLOBALS['phpgw']->datetime->days_in_month($holiday['month'],$year);
                                if ($day > $ld)
                                {
***************
*** 40,45 ****
                        else
                        {
!                               $ld = 
$datetime->days_in_month($holiday['month'],$year);
!                               $dow = 
$datetime->day_of_week($year,$holiday['month'],$ld);
                                $day = $ld - (($dow + 7) - $holiday['dow']) % 7 
;
                        }
--- 40,45 ----
                        else
                        {
!                               $ld = 
$GLOBALS['phpgw']->datetime->days_in_month($holiday['month'],$year);
!                               $dow = 
$GLOBALS['phpgw']->datetime->day_of_week($year,$holiday['month'],$ld);
                                $day = $ld - (($dow + 7) - $holiday['dow']) % 7 
;
                        }
***************
*** 50,54 ****
                        if($holiday['observance_rule'] == True)
                        {
!                               $dow = 
$datetime->day_of_week($year,$holiday['month'],$day);
                                // This now calulates Observed holidays and 
creates a new entry for them.
                                if($dow == 0)
--- 50,54 ----
                        if($holiday['observance_rule'] == True)
                        {
!                               $dow = 
$GLOBALS['phpgw']->datetime->day_of_week($year,$holiday['month'],$day);
                                // This now calulates Observed holidays and 
creates a new entry for them.
                                if($dow == 0)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]