8-Bit Software Online Conversion

Calendar - Listing

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