diff options
author | Chad Little <clittle@users.sourceforge.net> | 2004-05-19 06:50:57 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2004-05-19 06:50:57 +0000 |
commit | 483f597084ca701641090d26be62214a5e9bb871 (patch) | |
tree | 15bd2990a74901567d02891c24de67f62447d9e4 /functions/ical_parser.php | |
parent | 09c8b749969e00092c661f0c8ed761aba5e4cdfb (diff) | |
download | phpicalendar-483f597084ca701641090d26be62214a5e9bb871.tar.gz phpicalendar-483f597084ca701641090d26be62214a5e9bb871.tar.bz2 phpicalendar-483f597084ca701641090d26be62214a5e9bb871.zip |
Fixed Memorial Day for ical holidays.
Diffstat (limited to 'functions/ical_parser.php')
-rw-r--r-- | functions/ical_parser.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/functions/ical_parser.php b/functions/ical_parser.php index 3700486..b2b1257 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -526,7 +526,6 @@ foreach ($cal_filelist as $filename) { } } $next_date = date('Ymd', $next_date_time); - //$recur_data[] = $next_date_time; } } break; @@ -537,13 +536,19 @@ foreach ($cal_filelist as $filename) { $bymonth = array("$m"); } 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); foreach($byday as $day) { ereg ('([-\+]{0,1})?([0-9]{1})?([A-Z]{2})', $day, $byday_arr); - $nth = $byday_arr[2]-1; + if ($byday_arr[2] != '') { + $nth = $byday_arr[2]-1; + } else { + $nth = 0; + } $on_day = two2threeCharDays($byday_arr[3]); + $on_day_num = two2threeCharDays($byday_arr[3],false); if ($byday_arr[1] == '-') { $last_day_tmp = date('t',$checkdate_time); $checkdate_time = strtotime(date('Y-m-'.$last_day_tmp, $checkdate_time)); @@ -556,6 +561,7 @@ foreach ($cal_filelist as $filename) { } else { $day = date('d', $start_date_time); $next_date_time = mktime(0,0,0,$month,$day,$year); + //echo date('Ymd',$next_range_time).$summary.'<br>'; } $recur_data[] = $next_date_time; } @@ -573,7 +579,7 @@ foreach ($cal_filelist as $filename) { } $recur_data[] = $next_date_time; } - } + } break; default: // anything else we need to end the loop |