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

iCalDate::GetMonthByDay ( byday )

Applies any BYDAY to the month to return a set of days

Parameters:
string$bydayThe BYDAY rule
Returns:
array An array of the day numbers for the month which meet the rule.

Definition at line 404 of file RRule.php.

References DaysInMonth(), and MonthDays().

                                 {
    dbg_error_log( "RRule", " Applying BYDAY %s to month", $byday );
    $days_in_month = $this->DaysInMonth();
    $dayrules = split(',',$byday);
    $set = array();
    $first_dow = (date('w',$this->_epoch) - $this->_dd + 36) % 7;
    foreach( $dayrules AS $k => $v ) {
      $days = $this->MonthDays($first_dow,$days_in_month,$v);
      foreach( $days AS $k2 => $v2 ) {
        $set[$v2] = $v2;
      }
    }
    asort( $set, SORT_NUMERIC );
    return $set;
  }

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index