original_string: 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);
          }
      }
code: 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);
          }
      }
code_tokens: 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 ) ; } }
docstring: 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
docstring_tokens: Converts from a supported calendar to Julian Day Count