From 4278ace1f7fb8f1dd24f2cccf9885e30c65538a7 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sat, 8 Jan 2011 13:33:52 +1300 Subject: [PATCH] Display RECURRENCE-ID as appropriate. Signed-off-by: Andrew McMillan --- inc/RRule-v2.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/RRule-v2.php b/inc/RRule-v2.php index 8bce687d..62dbe1f3 100644 --- a/inc/RRule-v2.php +++ b/inc/RRule-v2.php @@ -1086,9 +1086,9 @@ function expand_event_instances( $vResource, $range_start = null, $range_end = n 'RRULE' => true, 'RDATE' => true, 'EXDATE' => true) ); } $component->AddProperty('DTSTART', $utc, ($is_date ? array('VALUE' => 'DATE') : null) ); - if ( $has_repeats ) - $component->AddProperty('RECURRENCE-ID', $utc, ($is_date ? array('VALUE' => 'DATE') : null) ); $component->AddProperty('DURATION', $duration ); + if ( $has_repeats && $dtstart->FloatOrUTC() != $utc ) + $component->AddProperty('RECURRENCE-ID', $utc, ($is_date ? array('VALUE' => 'DATE') : null) ); $new_components[] = $component; }