Update of /cvsroot/phpicalendar/phpicalendar/functions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4759/functions
Modified Files:
ical_parser.php
Log Message:
Fixed more yearly events, but Jan 1 does not display in december.
Index: ical_parser.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v
retrieving revision 1.161
retrieving revision 1.162
diff -C2 -d -r1.161 -r1.162
*** ical_parser.php 19 May 2004 06:50:57 -0000 1.161
--- ical_parser.php 19 May 2004 07:51:58 -0000 1.162
***************
*** 321,326 ****
$this_month_start_time = strtotime($this_year.$this_month.'01');
if ($save_parsed_cals == 'yes' && !$is_webcal) {
! $start_range_time = strtotime($this_year.'-01-01 -1 month -2 days');
! $end_range_time = strtotime($this_year.'-12-31 +1 month +2 days');
} else {
$start_range_time = strtotime('-1 month -2 day', $this_month_start_time);
--- 321,326 ----
$this_month_start_time = strtotime($this_year.$this_month.'01');
if ($save_parsed_cals == 'yes' && !$is_webcal) {
! $start_range_time = strtotime($this_year.'-01-01 -2 weeks');
! $end_range_time = strtotime($this_year.'-12-31 +2 weeks');
} else {
$start_range_time = strtotime('-1 month -2 day', $this_month_start_time);
***************
*** 537,542 ****
}
foreach($bymonth as $month) {
! // Something is wrong with this range
$year = date('Y', $next_range_time);
if ((isset($byday)) && (is_array($byday))) {
$checkdate_time = mktime(0,0,0,$month,1,$year);
--- 537,545 ----
}
foreach($bymonth as $month) {
! // FIXME: Jan 1 does not display in December
$year = date('Y', $next_range_time);
+ if (($year != $this_year) && ($month < 3)) {
+ $year = $this_year;
+ }
if ((isset($byday)) && (is_array($byday))) {
$checkdate_time = mktime(0,0,0,$month,1,$year);
|