You are here

function cmfcCalendarV1Julian::daysInMonth in Calendar Systems 8.2

Same name and namespace in other branches
  1. 8 calendar/v1/calendarSystems/julian.class.inc.php \cmfcCalendarV1Julian::daysInMonth()
  2. 7 calendar/v1/calendarSystems/julian.class.inc.php \cmfcCalendarV1Julian::daysInMonth()
  3. 7.2 calendar/v1/calendarSystems/julian.class.inc.php \cmfcCalendarV1Julian::daysInMonth()

Find Number Of Days In This Month

File

calendar/v1/calendarSystems/julian.class.inc.php, line 683

Class

cmfcCalendarV1Julian

Code

function daysInMonth($monthId, $ctype = 'gregorian') {
  $daysInMonth = array(
    'jalali' => array(
      '31',
      '31',
      '31',
      '31',
      '31',
      '31',
      '30',
      '30',
      '30',
      '30',
      '30',
      '29',
    ),
    'gregorian' => array(
      '31',
      '28',
      '31',
      '30',
      '31',
      '30',
      '31',
      '31',
      '30',
      '31',
      '30',
      '31',
    ),
  );
  return $daysInMonth[$ctype][$monthId];
}