protected function getMonth($date, $pattern = 'M')
{
$month = $date['mon'];
switch ($pattern) {
case 'M':
return $month;
case 'MM':
return str_pad($month, 2, '0', STR_PAD_LEFT);
case 'MMM':
return $this->formatInfo->AbbreviatedMonthNames[$month - 1];
break;
case 'MMMM':
return $this->formatInfo->MonthNames[$month - 1];
default:
throw new Exception('The pattern for month ' . 'is "M", "MM", "MMM", or "MMMM".');
}
}