protected function yearToHebrewNumerals($year, $alafim_geresh, $alafim, $gereshayim)
    {
        if ($year < 1000) {
            return $this->numberToHebrewNumeralsIso8859($year, $gereshayim);
        } else {
            $thousands = $this->numberToHebrewNumeralsIso8859((int) ($year / 1000), false);
            if ($alafim_geresh) {
                $thousands .= self::GERESH_ISO8859;
            }
            if ($alafim) {
                $thousands .= ' ' . self::ALAFIM_ISO8859 . ' ';
            }

            return $thousands . $this->numberToHebrewNumeralsIso8859($year % 1000, $gereshayim);
        }
    }