	REM DOW.BAS  * PROGRAM TO FIGURE OUT THE DAY OF THE WEEK

	DIM D$(150)

	B$="312831303130313130313031"
	C$="SUNDAY   MONDAY   TUESDAY  WEDNESDAYTHURSAY  FRIDAY   SATURDAY "
	D$="JANUARY  FEBRUARY MARCH    APRIL    MAY      JUNE     "
	D$=D$+"JULY     AUGUST   SEPTEMBEROCTOBER  NOVEMBER DECEMBER "

60      CS=1:PRINT:INPUT "DATE <MMDDYY> ";LINE A$
	M=VAL(LEFT$(A$,2)):D=VAL(MID$(A$,3,2)):Y=VAL(RIGHT$(A$,2))+1900
	Y1=365.25*(Y-1)
	IF Y/4=INT(Y/4) AND M<3 THEN CS=CS-1
	M1=0
	IF M=1 THEN 190
	FOR X=1 TO M-1:M1=M1+VAL(MID$(B$,X*2-1,2)):NEXT X

190 	D1=D-1:T=Y1+M1+D1:T1=INT((T/7-INT(T/7))*7+.48)+CS
	IF T1>7 THEN T1=T1-7
	PRINT MID$(C$,T1*9-8,9);" ";MID$(D$,M*9-8,9);",";D;"19";Y
	GOTO 60


