From ef384f180b9e61d9a3edd7629d8793a4245d18cd Mon Sep 17 00:00:00 2001 From: Chad Little Date: Fri, 14 Nov 2003 05:15:21 +0000 Subject: Added a condition to WEEKLY RRULE to set dates that do not have a BYDAY. --- functions/ical_parser.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'functions') diff --git a/functions/ical_parser.php b/functions/ical_parser.php index fdef179..b9c5a6f 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -435,7 +435,11 @@ foreach ($cal_filelist as $filename) { $recur_data[] = $next_date_time; break; case 'WEEKLY': - if (is_array($byday)) { + if (!isset($byday)) { + $next_date = date('Ymd', $next_range_time); + $next_date_time = strtotime($next_date); + $recur_data[] = $next_date_time; + } elseif (is_array($byday)) { // loop through the days on which this event happens foreach($byday as $day) { // use my fancy little function to get the date of each day -- cgit v1.2.3