/** * Converts from a supported calendar to Julian Day Count * * Shim implementation of \cal_to_jd() * * @link https://php.net/cal_to_jd * * @param int $calendar * @param int $month * @param int $day * @param int $year * * @return int */ public static function calToJd($calendar, $month, $day, $year) { switch ($calendar) { case CAL_FRENCH: return Shim::frenchToJd($month, $day, $year); case CAL_GREGORIAN: return Shim::gregorianToJd($month, $day, $year); case CAL_JEWISH: return Shim::jewishToJd($month, $day, $year); case CAL_JULIAN: return Shim::julianToJd($month, $day, $year); default: return trigger_error('invalid calendar ID ' . $calendar . '.', E_USER_WARNING); } }
/** * Hebrew month names. * * @link https://bugs.php.net/bug.php?id=54254 * * @param int $year * * @return string[] */ protected function hebrewMonthNames($year) { $leap_year = $this->leapYear($year); return array(1 => 'תשרי', 'חשון', 'כסלו', 'טבת', 'שבט', $leap_year ? Shim::emulateBug54254() ? 'אדר' : 'אדר א׳' : 'אדר', $leap_year ? Shim::emulateBug54254() ? '\'אדר ב' : 'אדר ב׳' : 'אדר', 'ניסן', 'אייר', 'סיון', 'תמוז', 'אב', 'אלול'); }