Logo Search packages:      
Sourcecode: davical version File versions  Download package

iCalDate::AddDays ( dd )

Add some integer number of days to a date

Definition at line 256 of file RRule.php.

References _EpochFromParts(), _TextFromEpoch(), and DaysInMonth().

Referenced by AddDuration().

                          {
    $at_start = $this->_text;
    $this->_dd += $dd;
    while ( 1 > $this->_dd ) {
      $this->_mo--;
      if ( $this->_mo < 1 ) {
        $this->_mo += 12;
        $this->_yy--;
      }
      $this->_dd += $this->DaysInMonth();
    }
    while ( ($dim = $this->DaysInMonth($this->_mo)) < $this->_dd ) {
      $this->_dd -= $dim;
      $this->_mo++;
      if ( $this->_mo > 12 ) {
        $this->_mo -= 12;
        $this->_yy++;
      }
    }
    $this->_EpochFromParts();
    $this->_TextFromEpoch();
    dbg_error_log( "RRule", " Added %d days to %s and got %s", $dd, $at_start, $this->_text );
  }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index