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);
        }
    }
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);
        }
    }
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 ) ; } }
Format a year using Hebrew numerals.

@param int  $year
@param bool $alafim_geresh Add a geresh  (׳) after thousands
@param bool $alafim        Add the word for thousands after the thousands
@param bool $gereshayim    Add geresh (׳) and gershayim (״) punctuation to numeric values

@return string
Format a year using Hebrew numerals .