0 MODE7 5 REM CALENDR by Lorin Knight 1991, revised 1995 10 CLS:PRINTTAB(9)CHR$141"PERPETUAL CALENDAR":PRINTTAB(9)CHR$141"PERPETUAL CALENDAR":PRINT'"This gives the day of week for any date"'"after 1752."''"In that year the British calendar"'"omitted the days from 11th to 13th"'"September to bring it into line with" 50 PRINT"the‚New Style‡(Gregorian) calendar,"'"already in use in the rest of Europe."''"Also in 1752 England, Wales and"'"Ireland changed to the‚New Reckoning"'"by which the year began on January 1st" 60 PRINT"instead of March 25th. Scotland had"'"changed in 1600 and most other European"'"countries considerably earlier." 70 PRINT'"Not surprisingly, there was some"'"confusion regarding dates in 1752 and"'"earlier!":PRINT''SPC13"‚PRESS SPACE";:X=GET:CLS 100 DIMC%(14):DIMX$(6):DIMM$(12):FORN%=1TO14:READC%(N%):NEXT:FORN%=0TO6:READX$(N%):NEXT:FORN%=1TO12:READM$(N%):NEXT 140 DATA6,2,2,5,0,3,5,1,4,6,2,4,5,1 150 DATASunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday 160 DATAJanuary,February,March,April,May,June,July,August,September,October,November,December 170 PRINT'''TAB(6)"‚ ddmmyyyy":REPEATINPUT" ‚Enter date:‡"E%:Y%=E%MOD10^4:IFY%<1753PRINT'"ˆ‚Date before 1753"':VDU7 220 UNTILY%>1752:D%=E%DIV10^6:M%=(E%MOD10^6)DIV10^4:PROCA:X%=(A%+B%+C%+D%)MOD7:X$=X$(X%):PRINT'" ";X$;" ";STR$(D%);FNA(D%);" ";M$(M%);" "STR$(Y%):GOTO170 300 DEFPROCA:A%=Y%MOD400:IF(A%MOD4=0ANDA%MOD100<>0)ORA%=0 L%=1ELSEL%=0 330 IFL%=1ANDM%<3 m%=M%+12ELSEm%=M% 340 B%=A%DIV4-A%DIV100:C%=C%(m%):ENDPROC 370 DEFFNA(X%):IFX%=1ORX%=21ORX%=31="st" 390 IFX%=2ORX%=22="nd" 400 IFX%=3ORX%=23="rd" 410 ="th"