public static double jauTf2d(char s, int ihour, int imin, double sec) throws JSOFAIllegalParameter
    {
        double days;
        /* Compute the interval. */
        days  = ( s == '-' ? -1.0 : 1.0 ) *
                ( 60.0 * ( 60.0 * ( (double) abs(ihour) ) +
                        ( (double) abs(imin) ) ) +
                        abs(sec) ) / DAYSEC;

        /* FIXME Validate arguments and return status. */
        if ( ihour < 0 || ihour > 23 )  throw new JSOFAIllegalParameter("bad hour", 1);
        if ( imin < 0 || imin > 59 )    throw new JSOFAIllegalParameter("bad minute", 2);
        if ( sec < 0.0 || sec >= 60.0 ) throw new JSOFAIllegalParameter("bad second", 3);
        return days;

    }