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

iCalDate::DaysInMonth ( mo = false,
yy = false 
)

No of days in a month 1(Jan) - 12(Dec)

Definition at line 179 of file RRule.php.

Referenced by AddDays(), AddMonths(), GetMonthByDay(), GetMonthByMonthDay(), and SetMonthDay().

                                               {
    if ( $mo === false ) $mo = $this->_mo;
    switch( $mo ) {
      case  1: // January
      case  3: // March
      case  5: // May
      case  7: // July
      case  8: // August
      case 10: // October
      case 12: // December
        return 31;
        break;

      case  4: // April
      case  6: // June
      case  9: // September
      case 11: // November
        return 30;
        break;

      case  2: // February
        if ( $yy === false ) $yy = $this->_yy;
        if ( (($yy % 4) == 0) && ((($yy % 100) != 0) || (($yy % 400) == 0) ) ) return 29;
        return 28;
        break;

      default:
        dbg_error_log( "ERROR"," Invalid month of '%s' passed to DaysInMonth", $mo );
        break;

    }
  }

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index