Category : BASIC Source Code
Archive   : CHRONOS.ZIP
Filename : JULIAN-M.BAS

 
Output of file : JULIAN-M.BAS contained in archive : CHRONOS.ZIP
38000 '***********************************************************************
38010 'Julian to Gregorian conversions - Adapted By; Frederick Volking 3/15/87
38020 ' Language MicroSoft BASIC
38030 '
38040 'Valid for dates between Gregorian: 03/01/00 = Julian:0
38050 ' thru Julian:3,652,365 = Gregorian 12/31/9999
38060 '
38070 'Line 39000 - Converts a Gregorian Month,Day,Year into a Julian value
38080 ' Incomming JM#=month,JD#=day,JY#=year
38090 ' Returns JJ#-Julian Value : Interal Use of J1# & J2#
38100 '
38110 'Line 39100 - Converts a Julian value to a Gregorian Month,Day,Year
38120 ' Incomming JJ# Julian Value
38130 ' Returns JM#=month,JD#=day,JY#=year
38140 '
38150 ' **********************************************************************
39000 REM input Month,Day,Year - return Julian
39010 IF JM#>2# THEN JM#=JM#-3# : GOTO 39040
39020 JM#=JM#+9#
39030 JY#=JY#-1#
39040 J2#=FIX(JY#/100#)
39050 J1#=JY#-100#*J2#
39060 JJ#=FIX((146097#*J2#)/4#)+FIX((1461#*J1#)/4#)+FIX((153#*JM#+2#)/5#)+JD#+1721119#
39070 RETURN
39100 REM input Julian - return Month,Day,Year
39110 JJ#=JJ#-1721119#
39120 JY#=FIX((4#*JJ#-1#)/146097#)
39130 JJ#=4#*JJ#-1#-146097#*JY#
39140 JD#=FIX(JJ#/4#)
39150 JJ#=FIX((4#*JD#+3#)/1461#)
39160 JD#=4#*JD#+3#-1461#*JJ#
39170 JD#=FIX((JD#+4#)/4#)
39180 JM#=FIX((5#*JD#-3#)/153#)
39190 JD#=5#*JD#-3#-153#*JM#
39200 JD#=FIX((JD#+5#)/5#)
39210 JY#=100#*JY#+JJ#
39220 IF JM#<10# THEN JM#=JM#+3# : GOTO 39250
39230 JM#=JM#-9#
39240 JY#=JY#+1#
39250 RETURN


  3 Responses to “Category : BASIC Source Code
Archive   : CHRONOS.ZIP
Filename : JULIAN-M.BAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/