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);
        }
    }