protected function getAMPM($date, $pattern = 'a') { if ($pattern != 'a') { throw new Exception('The pattern for AM/PM marker is "a".'); } $hour = $date['hours']; $ampm = (int) ($hour / 12); return $this->formatInfo->AMPMMarkers[$ampm]; }