Almanak Hins íslenska þjóðvinafélags - 01.01.1986, Síða 96
10 REM DAGATAL. GILDIR FYRIR NÝJA STlL (GREGORÍANSKT TlMATAL)
20 REM Þ.S. 1984
30 DATA 1,4,4,0,2,5,0,3,6,1,4,6
40 DIM MT (12) : FOR 1 = 1 TO 12-.READ MT(I):NEXT I
50 DATA "LAUGARDAGUR","SUNNUDAGUR","MÁNUDAGUR","ÞRIÐJUDAGUR"
60 DATA "MIÐVIKUDAGUR","FIMMTUDAGUR","FÖSTUDAGUR"
70 DIM DN$(6):FOR 1=0 TO 6:READ DN$(I):NEXT I
80 INPUT "DAGUR=";DAG$:DAG=VAL(DAG$): IF ASC(DAG$)>57 GOTO 100
90 INPUT "MÁNUÐUR=";MAN
100 INPUT "ÁR=";AR:IF ASC(DAG$)>57 GOTO 150
110 GOSUB 610:X=AA+MT(MAN)+DAG-1
120 IF HL=1 THEN IF MAN>2 THEN X=X+1
130 X=X-7*INT(X/7)
140 PRINT DN$(X):GOTO 80
150 IF DAG$="PÁS" GOTO 260
160 IF DAG$="UPP" GOTO 280
170 IF DAG$="HVl" GOTO 310
180 IF DAG$="ÖSK" GOTO 330
190 IF DAG$="SUM" GOTO 360
200 IF DAG$="FYR" GOTO 380
210 IF DAG$="ÞOR" OR DAG$="BÓN" GOTO 410
220 IF DAG$="GÓA" OR DAG$="KON" GOTO 440
230 IF DAG$="FRÍ" GOTO 470
240 IF DAG$="AÐV" OR DAG$="JÓL" GOTO 490
250 GOTO 80
260 GOSUB 520:M$="MARS":IF N=4 THEN M$="APRlL"
270 PRINT "PÁSKADAGUR";Q;M$:GOTO 80
280 GOSUB 520:M$="MAl":D=PS-22: IF D>31 THEN M$="JÚNl":D=D-31
290 IF PS=22 THEN D=30:M$="APRlL"
300 PRINT "UPPSTIGNINGARDAGUR";D;M$:GOTO 80
310 GOSUB 520:M$="MAl":D=PS-12:IF D>31 THEN M$="JÚNl":D=D-31
320 PRINT "HVlTASUNNA";D;M$:GOTO 80
330 GOSUB 520:GOSUB 640:M$="FEBRÚAR":D=PS-18 +HL
340 IF D>28+HL THEN D=D-28-HL:M$="MARS"
350 PRINT "ÖSKUDAGUR";D;M$:GOTO 80
360 GOSUB 610:D=27-AH:IF D>25 THEN D=D-7
370 PRINT "SUMARDAGURINN FYRSTI";D;"APRlL":GOTO 80
380 GOSUB 610:D=28-AH:IF D=28 THEN D=21
390 AR=AR+1:GOSUB 640:IF AA=0 AND HL=1 THEN D=D+7
400 PRINT "FYRSTI VETRARDAGUR";D;"OKT. (LAUGARDAGUR)":GOTO 80
410 GOSUB 610:D=27-AH:IF D>25 THEN D=D-7
420 D=D+HL
430 PRINT "ÞORRI BYRJAR. BÓNDADAGUR";D;"JANÚAR":GOTO 80
440 GOSUB 610:D= 26-AH:IF D>24 THEN D=D-7
450 D=D+HL
460 PRINT "GÓA BYRJAR. KONUDAGUR";D;"FEBRÚAR":GOTO 80
470 GOSUB 610:D=7-AH:IF D=0 THEN D=7
480 PRINT "FRlDAGUR VERSLUNARMANNA";D;"ÁGÚST":GOTO 80
490 GOSUB 610:M$ = "NÓV":D= 33-AH:IF D<27 THEN D=D+7
500 IF D>30 THEN D=D-30:M$="DES"
510 PRINT "JÓLAFASTA (AÐVENTA)";D;M$:GOTO 80
520 A=AR-INT(AR/19)*19:B=INT(AR/100):C=AR-B*100
530 D=INT(B/4):E=B-D*4:F=INT((B+8)/25)
540 G=INT((B-F+l)/3):X=19*A+B-D-G+15:Y=INT(X/30)
550 H=X-Y*30:I=INT(C/4):J=C-4*I
560 X=32+2*E+2*I-H-J:Y=INT(X/7):K=X-Y*7
570 M=INT((A+11*H+22*K)/451):X=H+K-7*M+114
580 N=INT(X/31):P=X-N*31:Q=P+1
590 PS=Q:IF N=4 THEN PS=Q+31
600 RETURN
610 X=INT((AR-1)/4):Y=INT((AR-1)/100):Z=INT((AR-1)/400)
620 X=AR+X-Y+Z
630 AA=X-INT(X/7)*7
640 HL=0:IF AR=INT(AR/4)*4 THEN HL=1
650 IF AR=INT(AR/100)*100 AND AR>INT(AR/400)*400 THEN HL=0
660 AH=AA+HL
670 RETURN
(94)