#Date Program #autonumber new dim sizeofmonth(11) dim juliandays(11) s($5)="Sunday" s($6)="Monday" s($7)="Tuesday" s($8)="Wednesday" s($9)="Thursday" s($10)="Friday" s($11)="Saturday" sizeofmonth(0)=31 sizeofmonth(1)=28 sizeofmonth(2)=31 sizeofmonth(3)=30 sizeofmonth(4)=31 sizeofmonth(5)=30 sizeofmonth(6)=31 sizeofmonth(7)=31 sizeofmonth(8)=30 sizeofmonth(9)=31 sizeofmonth(10)=30 sizeofmonth(11)=30 juliandays(0)=0 juliandays(0)=31 juliandays(0)=59 juliandays(0)=90 juliandays(0)=120 juliandays(0)=151 juliandays(0)=181 juliandays(0)=212 juliandays(0)=243 juliandays(0)=273 juliandays(0)=304 juliandays(0)=334 40 daynumber = 0 41 input "Enter the month:",MONTH if MONTH > 12 then goto 41 if month < 1 then goto 41 50 input "Enter the day of month:", DAYOFMONTH if DAYOFMONTH < 1 then goto 50 MONTH = MONTH - 1 if DAYOFMONTH > sizeofmonth(MONTH) then goto 50 60 input "Enter the year:', YEAR if YEAR > 1999 then goto 60 if YEAR < 1900 then goto 60 gosub 80 MONTH = MONTH + 1 date$=str$(MONTH) + "-" + str$(DAYOFMONTH) + "-" + str$(YEAR) dprint date$, "is on a ", s$(daynumber+5) dprint "The Julian date is ", j, "/", YEAR input "Enter another date?", s$(4) if s$(4) = "N" or s$(4) = "n" then end goto 40 80 j= juliandays(MONTH) + DAYOFMONTH y=YEAR = 1900 x =365.25 * y + j rem (y= last 2 digits of year, j = julian day) xint = int(x) xdec = x - xint if xdec = 0 then xint = xint+1: if MONTH > 2 then j = j+1 xint = int(xint/7) daynumber = x - (xint*7) return run