diff options
author | Chad Little <clittle@users.sourceforge.net> | 2004-05-19 07:51:58 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2004-05-19 07:51:58 +0000 |
commit | 1d266b009de481d8290e9e4aa6aaf1f807714c19 (patch) | |
tree | a8f39fd371f491427d29049e59c243329b8a1f33 /functions | |
parent | 483f597084ca701641090d26be62214a5e9bb871 (diff) | |
download | phpicalendar-1d266b009de481d8290e9e4aa6aaf1f807714c19.tar.gz phpicalendar-1d266b009de481d8290e9e4aa6aaf1f807714c19.tar.bz2 phpicalendar-1d266b009de481d8290e9e4aa6aaf1f807714c19.zip |
Fixed more yearly events, but Jan 1 does not display in december.
Diffstat (limited to 'functions')
-rw-r--r-- | functions/ical_parser.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/functions/ical_parser.php b/functions/ical_parser.php index b2b1257..db5cb4e 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -320,8 +320,8 @@ foreach ($cal_filelist as $filename) { $start_date_time = strtotime($start_date); $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'); + $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); $end_range_time = strtotime('+2 month +2 day', $this_month_start_time); @@ -536,8 +536,11 @@ foreach ($cal_filelist as $filename) { $bymonth = array("$m"); } foreach($bymonth as $month) { - // Something is wrong with this range + // 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); foreach($byday as $day) { |