REM julian.bas Copyright 2003 (c) by Mike Ramos of US Internet Technoogies, Inc. REM free use os this program if you leave my credit line. REM REM Now if we flip this you can calc a date, add 10 (10 days) and get the date 10 days from that REM day. Just a thought. REM d$="01/01/1900" gosub julian start&=numdays& d$="01/01/2000" days$=str$(numdays& - start&) print "There are "+days$+" between from 01/01/1900 and 01/01/2000" end julian: M&=val(left$(d$,2)) D&=val(mid$(d$,4,2)) Y&=val(mid$(d$,7,4)) Julian& = -1 IF Y& < 0 THEN goto jo : REM Mod. #1 IF (M& < 1) OR (M& > 12) THEN goto jo IF (D& < 1) OR (D& > 31) THEN goto jo IF Y& < 100 THEN Y& = Y& + 1900 : REM Mod. #1 Temp& = (M& - 14) / 12 JulPart& = D& - 32075 + (1461 * (Y& + 4800 + Temp&) / 4) JnulPart& = JulPart& + (367 * (M& - 2 - Temp& * 12) / 12) numdays& = JulPart& - (3 * ((Y& + 4900 + Temp&) / 100) / 4) jo: return