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.25,


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.25,1.71.2.26
Date: Sat, 16 Nov 2002 12:10:23 -0500

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

Modified Files:
      Tag: Version-0_9_14-branch
        class.bocalendar.inc.php 
Log Message:
2 language/dateformat fixes:
1) the short status in the day/week/month view gets now translated
2) the week_label in the week-view respects now the date-format in the prefs

Index: class.bocalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.bocalendar.inc.php,v
retrieving revision 1.71.2.25
retrieving revision 1.71.2.26
diff -C2 -r1.71.2.25 -r1.71.2.26
*** class.bocalendar.inc.php    6 Nov 2002 16:29:57 -0000       1.71.2.25
--- class.bocalendar.inc.php    16 Nov 2002 17:10:21 -0000      1.71.2.26
***************
*** 1185,1188 ****
--- 1185,1190 ----
                        if(@$this->prefs['calendar']['display_status'])
                        {
+                               $user_status = 
substr($this->get_long_status($user_status),0,1);
+ 
                                return ' ('.$user_status.')';
                        }
***************
*** 1264,1286 ****
                }
  
!               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
!                       $week_id = lang(strftime("%B",$first['raw'])).' 
'.$first['day'];
!                       if($first['month'] <> $last['month'] && $first['year'] 
<> $last['year'])
                        {
!                               $week_id .= ', '.$first['year'];
!                       }
!                       $week_id .= ' - ';
!                       if($first['month'] <> $last['month'])
!                       {
!                               $week_id .= lang(strftime("%B",$last['raw'])).' 
';
                        }
!                       $week_id .= $last['day'].', '.$last['year'];
  
!                       return $week_id;
                }
  
--- 1266,1326 ----
                }
  
!               function date_range($first,$last)
                {
!                       $datefmt = $this->prefs['common']['dateformat'];
!                       
!                       $month_before_day = $datefmt[0] == 'm' || $datefmt[2] 
== 'm' && $datefmt[4] == 'd';
  
!                       for ($i = 0; $i < 5; $i += 2)
                        {
!                               switch($datefmt[$i])
!                               {
!                                       case 'd':
!                                               $range .= $first['day'] . 
($datefmt[1] == '.' ? '.' : '');
!                                               if ($first['month'] != 
$last['month'] || $first['year'] != $last['year'])
!                                               {
!                                                       if (!$month_before_day)
!                                                       {
!                                                               $range .= ' 
'.lang(strftime('%B',$first['raw']));
!                                                       }
!                                                       if ($first['year'] != 
$last['year'] && $datefmt[0] != 'Y')
!                                                       {
!                                                               $range .= 
($datefmt[0] != 'd' ? ', ' : ' ') . $first['year'];
!                                                       }
!                                                       $range .= ' - ';
!                                                       
!                                                       if ($first['year'] != 
$last['year'] && $datefmt[0] == 'Y')
!                                                       {
!                                                               $range .= 
$last['year'] . ', ';
!                                                       }
! 
!                                                       if ($month_before_day)
!                                                       {
!                                                               $range .= 
lang(strftime('%B',$last['raw']));
!                                                       }
!                                               }
!                                               else
!                                               {
!                                                       $range .= ' - ';
!                                               }
!                                               $range .= ' ' . $last['day'] . 
($datefmt[1] == '.' ? '.' : '');
!                                               break;
!                                       case 'm':
!                                               $range .= ' 
'.lang(strftime('%B',$month_before_day ? $first['raw'] : $last['raw'])) . ' ';
!                                               break;
!                                       case 'Y':
!                                               $range .= ($datefmt[0] == 'm' ? 
', ' : ' ') . ($datefmt[0] == 'Y' ? $first['year'].', ' : $last['year'].' ');
!                                               break;
!                               }
                        }
!                       return $range;
!               }
  
!               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);
!          
!                       return ($this->date_range($first,$last));
                }
  





reply via email to

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