function setDuration( $week=FALSE, $day=FALSE, $hour=FALSE, $min=FALSE, $sec=FALSE, $params=FALSE ) {
    if( is_array( $week ))  {
      $this->duration['value']  = $this->_duration_array( $week );
      $this->duration['params'] = $this->_setParams( $day );
    }
    elseif( is_string( $week ) && ( 3 <= strlen( trim( $week )))) {
      if( in_array( substr( $week,0, 1 ), array( '+', '-' )))
        $week = substr( $week, 1 );
      $this->duration['value']  = $this->_duration_string( $week );
      $this->duration['params'] = $this->_setParams( $day );
    }
    else {
      $this->duration['value']  = $this->_duration_array( array( $week, $day, $hour, $min, $sec ));
      $this->duration['params'] = $this->_setParams( $params );
    }
  }
function setDuration( $week=FALSE, $day=FALSE, $hour=FALSE, $min=FALSE, $sec=FALSE, $params=FALSE ) {
    if( is_array( $week ))  {
      $this->duration['value']  = $this->_duration_array( $week );
      $this->duration['params'] = $this->_setParams( $day );
    }
    elseif( is_string( $week ) && ( 3 <= strlen( trim( $week )))) {
      if( in_array( substr( $week,0, 1 ), array( '+', '-' )))
        $week = substr( $week, 1 );
      $this->duration['value']  = $this->_duration_string( $week );
      $this->duration['params'] = $this->_setParams( $day );
    }
    else {
      $this->duration['value']  = $this->_duration_array( array( $week, $day, $hour, $min, $sec ));
      $this->duration['params'] = $this->_setParams( $params );
    }
  }
function setDuration ( $ week = FALSE , $ day = FALSE , $ hour = FALSE , $ min = FALSE , $ sec = FALSE , $ params = FALSE ) { if ( is_array ( $ week ) ) { $ this -> duration [ 'value' ] = $ this -> _duration_array ( $ week ) ; $ this -> duration [ 'params' ] = $ this -> _setParams ( $ day ) ; } elseif ( is_string ( $ week ) && ( 3 <= strlen ( trim ( $ week ) ) ) ) { if ( in_array ( substr ( $ week , 0 , 1 ) , array ( '+' , '-' ) ) ) $ week = substr ( $ week , 1 ) ; $ this -> duration [ 'value' ] = $ this -> _duration_string ( $ week ) ; $ this -> duration [ 'params' ] = $ this -> _setParams ( $ day ) ; } else { $ this -> duration [ 'value' ] = $ this -> _duration_array ( array ( $ week , $ day , $ hour , $ min , $ sec ) ) ; $ this -> duration [ 'params' ] = $ this -> _setParams ( $ params ) ; } }
set calendar component property duration

@author Kjell-Inge Gustafsson <ical@kigkonsult.se>
@since 0.9.18 - 2007-03-18
@param mixed $week
@param mixed $day optional
@param int $hour optional
@param int $min optional
@param int $sec optional
@param array $params optional
@return void
set calendar component property duration