public static function calFromJd($julian_day, $calendar_id)
    {
        switch ($calendar_id) {
            case CAL_FRENCH:
                return self::calFromJdCalendar($julian_day, self::jdToFrench($julian_day), self::$MONTH_NAMES_FRENCH, self::$MONTH_NAMES_FRENCH);

            case CAL_GREGORIAN:
                return self::calFromJdCalendar($julian_day, self::jdToGregorian($julian_day), self::$MONTH_NAMES, self::$MONTH_NAMES_SHORT);

            case CAL_JEWISH:
                $months = self::jdMonthNameJewishMonths($julian_day);

                $cal = self::calFromJdCalendar($julian_day, self::jdToCalendar(self::$jewish_calendar, $julian_day, 347998, 324542846), $months, $months);

                if (($julian_day < 347998 || $julian_day > 324542846) && !self::shouldEmulateBug67976()) {
                    $cal['dow'] = null;
                    $cal['dayname'] = '';
                    $cal['abbrevdayname'] = '';
                }

                return $cal;

            case CAL_JULIAN:
                return self::calFromJdCalendar($julian_day, self::jdToJulian($julian_day), self::$MONTH_NAMES, self::$MONTH_NAMES_SHORT);

            default:
                return trigger_error('invalid calendar ID ' . $calendar_id, E_USER_WARNING);
        }
    }
public static function calFromJd($julian_day, $calendar_id)
    {
        switch ($calendar_id) {
            case CAL_FRENCH:
                return self::calFromJdCalendar($julian_day, self::jdToFrench($julian_day), self::$MONTH_NAMES_FRENCH, self::$MONTH_NAMES_FRENCH);

            case CAL_GREGORIAN:
                return self::calFromJdCalendar($julian_day, self::jdToGregorian($julian_day), self::$MONTH_NAMES, self::$MONTH_NAMES_SHORT);

            case CAL_JEWISH:
                $months = self::jdMonthNameJewishMonths($julian_day);

                $cal = self::calFromJdCalendar($julian_day, self::jdToCalendar(self::$jewish_calendar, $julian_day, 347998, 324542846), $months, $months);

                if (($julian_day < 347998 || $julian_day > 324542846) && !self::shouldEmulateBug67976()) {
                    $cal['dow'] = null;
                    $cal['dayname'] = '';
                    $cal['abbrevdayname'] = '';
                }

                return $cal;

            case CAL_JULIAN:
                return self::calFromJdCalendar($julian_day, self::jdToJulian($julian_day), self::$MONTH_NAMES, self::$MONTH_NAMES_SHORT);

            default:
                return trigger_error('invalid calendar ID ' . $calendar_id, E_USER_WARNING);
        }
    }
public static function calFromJd ( $ julian_day , $ calendar_id ) { switch ( $ calendar_id ) { case CAL_FRENCH : return self :: calFromJdCalendar ( $ julian_day , self :: jdToFrench ( $ julian_day ) , self :: $ MONTH_NAMES_FRENCH , self :: $ MONTH_NAMES_FRENCH ) ; case CAL_GREGORIAN : return self :: calFromJdCalendar ( $ julian_day , self :: jdToGregorian ( $ julian_day ) , self :: $ MONTH_NAMES , self :: $ MONTH_NAMES_SHORT ) ; case CAL_JEWISH : $ months = self :: jdMonthNameJewishMonths ( $ julian_day ) ; $ cal = self :: calFromJdCalendar ( $ julian_day , self :: jdToCalendar ( self :: $ jewish_calendar , $ julian_day , 347998 , 324542846 ) , $ months , $ months ) ; if ( ( $ julian_day < 347998 || $ julian_day > 324542846 ) && ! self :: shouldEmulateBug67976 ( ) ) { $ cal [ 'dow' ] = null ; $ cal [ 'dayname' ] = '' ; $ cal [ 'abbrevdayname' ] = '' ; } return $ cal ; case CAL_JULIAN : return self :: calFromJdCalendar ( $ julian_day , self :: jdToJulian ( $ julian_day ) , self :: $ MONTH_NAMES , self :: $ MONTH_NAMES_SHORT ) ; default : return trigger_error ( 'invalid calendar ID ' . $ calendar_id , E_USER_WARNING ) ; } }
Converts from Julian Day Count to a supported calendar.

Shim implementation of cal_from_jd()

@link https://php.net/cal_from_jd

@param int $julian_day  Julian Day number
@param int $calendar_id Calendar constant

@return array|bool
Converts from Julian Day Count to a supported calendar .