Changeset 4398 for trunk/include/calendar_weekly.class.php
- Timestamp:
- Nov 30, 2009, 9:41:11 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/calendar_weekly.class.php
r3282 r4398 51 51 $this->calendar_levels = array( 52 52 array( 53 'sql'=> 'YEAR('.$this->date_field.')',53 'sql'=> pwg_db_get_year($this->date_field), 54 54 'labels' => null 55 55 ), 56 56 array( 57 'sql'=> 'WEEK('.$this->date_field.')+1',57 'sql'=> pwg_db_get_week($this->date_field)+1, 58 58 'labels' => $week_no_labels, 59 59 ), 60 60 array( 61 'sql'=> 'DAYOFWEEK('.$this->date_field.')-1',61 'sql'=> pwg_db_get_dayofweek($this->date_field)-1, 62 62 'labels' => $lang['day'] 63 63 ), … … 65 65 //Comment next lines for week starting on Sunday or if MySQL version<4.0.17 66 66 //WEEK(date,5) = "0-53 - Week 1=the first week with a Monday in this year" 67 $this->calendar_levels[CWEEK]['sql'] = 'WEEK('.$this->date_field.',5)+1';68 $this->calendar_levels[CDAY]['sql'] = 'WEEKDAY('.$this->date_field.')';67 $this->calendar_levels[CWEEK]['sql'] = pwg_db_get_week($this->date_field, 5).'+1'; 68 $this->calendar_levels[CDAY]['sql'] = pwg_db_get_weekday($this->date_field); 69 69 array_push( $this->calendar_levels[CDAY]['labels'], 70 70 array_shift( $this->calendar_levels[CDAY]['labels'] ) );
Note: See TracChangeset
for help on using the changeset viewer.