protected function getEra($date, $pattern = 'G')
{
if ($pattern != 'G') {
throw new Exception('The pattern for era is "G".');
}
$year = $date['year'];
if ($year > 0) {
return $this->formatInfo->getEra(1);
} else {
return $this->formatInfo->getEra(0);
}
}