public static function calToJd($calendar_id, $month, $day, $year)
    {
        switch ($calendar_id) {
            case CAL_FRENCH:
                return self::frenchToJd($month, $day, $year);

            case CAL_GREGORIAN:
                return self::gregorianToJd($month, $day, $year);

            case CAL_JEWISH:
                return self::jewishToJd($month, $day, $year);

            case CAL_JULIAN:
                return self::julianToJd($month, $day, $year);

            default:
                return trigger_error('invalid calendar ID ' . $calendar_id . '.', E_USER_WARNING);
        }
    }
public static function calToJd($calendar_id, $month, $day, $year)
    {
        switch ($calendar_id) {
            case CAL_FRENCH:
                return self::frenchToJd($month, $day, $year);

            case CAL_GREGORIAN:
                return self::gregorianToJd($month, $day, $year);

            case CAL_JEWISH:
                return self::jewishToJd($month, $day, $year);

            case CAL_JULIAN:
                return self::julianToJd($month, $day, $year);

            default:
                return trigger_error('invalid calendar ID ' . $calendar_id . '.', E_USER_WARNING);
        }
    }
public static function calToJd ( $ calendar_id , $ month , $ day , $ year ) { switch ( $ calendar_id ) { case CAL_FRENCH : return self :: frenchToJd ( $ month , $ day , $ year ) ; case CAL_GREGORIAN : return self :: gregorianToJd ( $ month , $ day , $ year ) ; case CAL_JEWISH : return self :: jewishToJd ( $ month , $ day , $ year ) ; case CAL_JULIAN : return self :: julianToJd ( $ month , $ day , $ year ) ; default : return trigger_error ( 'invalid calendar ID ' . $ calendar_id . '.' , E_USER_WARNING ) ; } }
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_id
@param int $month
@param int $day
@param int $year

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