Allow first parameter to RRule constructor to be an iCalDate.

This commit is contained in:
Andrew McMillan 2006-12-17 21:36:26 +13:00
parent 818ade993c
commit 2e50a0721a

View File

@ -664,7 +664,12 @@ class RRule {
* follow the iCalendar standard. * follow the iCalendar standard.
*/ */
function RRule( $start, $rrule ) { function RRule( $start, $rrule ) {
if ( is_object($start) ) {
$this->_first = $start;
}
else {
$this->_first = new iCalDate($start); $this->_first = new iCalDate($start);
}
$this->_finished = false; $this->_finished = false;
$this->_started = false; $this->_started = false;
$this->_dates = array( $this->_first ); $this->_dates = array( $this->_first );