From 2e50a0721a2ddf63c4b001d44c337c9d4660a441 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sun, 17 Dec 2006 21:36:26 +1300 Subject: [PATCH] Allow first parameter to RRule constructor to be an iCalDate. --- inc/RRule.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/inc/RRule.php b/inc/RRule.php index 65b7bc00..28cad2f9 100644 --- a/inc/RRule.php +++ b/inc/RRule.php @@ -664,7 +664,12 @@ class RRule { * follow the iCalendar standard. */ function RRule( $start, $rrule ) { - $this->_first = new iCalDate($start); + if ( is_object($start) ) { + $this->_first = $start; + } + else { + $this->_first = new iCalDate($start); + } $this->_finished = false; $this->_started = false; $this->_dates = array( $this->_first );