1 PRINT "From the May 1984 SKY & TELESCOPE, pp. 454-5." 2 PRINT 3 PRINT "This program converts a civil date to a Julian date. It will work" 4 PRINT "with either the Gregorian or Julian calendar, and with either" 5 PRINT "positive or negative years." 6 PRINT 7 PRINT "INPUT : Year (Y), month (M), day with fraction (D) (UT), Julian or" 8 PRINT " Gregorian calendar." 9 PRINT 10 PRINT "OUTPUT: Julian Day number, Julian Day fractional part." 11 PRINT 800 REM CALENDAR --> JD 805 REM 810 INPUT "Y,M,D ";Y,M,D 815 INPUT "JC (0) OR GC (1) ";G 820 D1=INT(D): F=D-D1-.5 825 J=-INT(7*(INT((M+9)/12)+Y)/4) 830 IF G=0 THEN 850 835 S=SGN(M-9): A=ABS(M-9) 840 J1=INT(Y+S*INT(A/7)) 845 J1=-INT((INT(J1/100)+1)*3/4) 850 J=J+INT(275*M/9)+D1+G*J1 855 J=J+1721027!+2*G+367*Y 860 IF F>=0 THEN 870 865 F=F+1: J=J-1 870 PRINT "J.D.: ";J;F 875 RUN"ASTRMENU.BAS"