Chapter 1 – Time (Julian Calendar)

Measuring time, different calendars
Spectrum Calendar, prints a calendar for any year after 1582
Julian Date, works out the Julian Day number for any date
Julian Calendar, prints a complete Julian Day calendar for any month of any year
Day of the Week, identifies the day of the week for any date
Interval Days, the interval between any two dates from a few minutes to centuries apart
Local Sidereal Time, calculates ‘star time’ for any date and hour
Reaction Timer, find out your reaction time to get accurate readings.

Julian Calendar

This program is a variation of the Julian Date program and PRINTs to the screen a complete Julian Day Calendar for any month of any year after October 1582 It also identifies the day of the week – highlighting the Sundays in INVERSE. See Figure 1.2.

Figure 1.2
Julian Day Calendar, with Julian Day number for each day.

Julian_Calendar

The program accounts for the actual number of days in the selected month. The JD is PRINTed in full and is timed at OhrUT (GMT) ie from midnight. As the JD begins at noon (of the previous day) a value of 0.5 is included in the answer. This represents the 12 hours between noon and midnight – the latter marking the start of a civil day.

9 REM ************************
10 CLS : PRINT “Julian Calendar “;
11 REM ************************
30 LET d$=”TuWeThFrSaSuMoJanFebMarAprMayJunJulAugSepOctNovDec”
40 INPUT “Year “;y,”Month “;m
50 LET m$=d$(m*3+12 TO m*3+14)
60 PRINT y;” “;m$;”(0hr UT)”
100 GO SUB 1000
110 LET x=0: LET a=0
115 FOR d=1 TO 31: LET j=jj+d
120 IF d>14 THEN LET x=14: LET a=3
150 IF j=j1+1 THEN STOP
160 LET q=j-7*INT (j/7)+1
170 LET e$=d$(2*q-1 TO 2*q)
180 INVERSE 0
190 IF e$=”Su” THEN INVERSE 1
200 PRINT AT 1+d-x,x+a;e$;d;
210 PRINT TAB x+6+a;j+.5
220 NEXT d: STOP
1000 LET ed=1720996: LET m1=m+1
1010 LET yy=y/100: LET y1=INT yy: LET yt=y/400: LET y4=INT yt
1020 IF yy=y1 AND yt<>y4 AND m<3 THEN LET ed=ed+1
1030 LET jj=ed+INT (365.25*(y-(m<3)))+INT (30.6001*(m+1+12*(m<3)))-y1+y4
1040 IF yy=y1 AND yt<>y4 AND m1=3 THEN LET ed=ed-1
1050 LET j1=ed+INT (365.25*(y-(m1<3)))+INT (30.6001*(m1+1+12*(m1<3)))-y1+y4
1060 RETURN
9900 REM ***********************
9990 SAVE “Jcal”



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s