Kalenderfunktionen:
Wochentagsbestimmung
Datendifferenz
Datumsbestimmung
Monatskalender
Zeichensatz UTF-8+Z1013()+CTRL()-ohne Umlaute(äöüß)
10! Kalender , 25.12. / 31.12.1989 D.A.
15! R|mischen Kalender am 6.11.'92 eingebunden
20 GOTO 180
30 H1=INT((H-122.1)/JL)
40 H2=INT((H-INT(H1*JL))/ML)
50 H3=H-INT(H1*JL)-INT(H2*ML)
60 H2=H2-1:IF H2>12 THEN H2=H2-12
70 IF H2<3 THEN H1=H1+1
80 RETURN
90 H$=MID$(STR$(H3),2)+"."+MID$(STR$(H2),2)+"."
100 H$=H$+MID$(STR$(H1),2):PRINT H$;:RETURN
110 HH=INSTR(".",H$):H1$=MID$(H$,HH+1):HL=INSTR(".",H1$)
120 H1=VAL(LEFT$(H$,HH-1)):H2=VAL(LEFT$(H1$,HL-1))+1
130 H5=LEN(H1$)-HL:H3=VAL(RIGHT$(H1$,H5)):IF H5>2 THEN 160
140 H3=H3+1900
150 H$=LEFT$(H$,LEN(H$)-H5)+MID$(STR$(H3),2)
160 JK=0:IF H2<4 THEN H2=H2+12:H3=H3-1:JK=1
170 H=INT(H3*JL)+INT(H2*ML)+H1:RETURN
180 WINDOW:CLS:WINDOW 5,31,3,31:JL=365.25:ML=30.6001
190 FOR A=0 TO 6:READ W$(A):W1$(A)=LEFT$(W$(A),2):NEXT:HT$=", den "
194 RESTORE 1000
195 FOR A=1 TO 9:READ I$(A):NEXT
196 FOR A=1 TO 9:READ X$(A):NEXT
197 FOR A=1 TO 9:READ C$(A):NEXT
200 PRINT AT(1,8);"EWIGER KALENDER":PRINT AT(2,7);STRING$(17,"*")
210 CLS:PRINT "Waehlen Sie bitte aus :":PRINT:PRINT
220 PRINT "1 Wochentagsbestimmung":PRINT
230 PRINT "2 Datendifferenz":PRINT
240 PRINT "3 Datumsbestimmung":PRINT
250 PRINT "4 Monatskalender":PRINT
260 PRINT "5 Ende":PRINT:PRINT:PRINT "Ihre Wahl ..."
270 GOSUB 300:IF A$<"1"OR A$>"5"THEN 270
280 CLS:ON VAL(A$)GOTO 310,350,400,580
290 WINDOW:CLS:END
300 A$=INKEY$:IF A$=""THEN 300:ELSE RETURN
310 INPUT "Datum :";H$:GOSUB 110:PRINT:GOSUB 340
320 PRINT "Der ";H$;" ist ein":PRINT W$(W);"."
330 GOSUB 900:GOSUB 300:GOTO 210
340 W=(H+5)/7:W=INT((W-INT(W))*7+.5):RETURN
350 INPUT "1. Datum :";D1$:PRINT:INPUT "2. Datum :";D2$
360 H$=D1$:GOSUB 110:GOSUB 340:D1=H:PRINT
370 PRINT "Zwischen ";W1$(W);HT$;H$
380 H$=D2$:GOSUB 110:GOSUB 340:PRINT "und ";W1$(W);HT$;H$
390 PRINT "liegen ";H-D1;"Tage.":GOSUB 300:GOTO 210
400 INPUT "Datum :";H$:PRINT:INPUT "Differenz :";D:PRINT
410 GOSUB 110:INPUT "Wie oft addieren ?";B:PRINT
420 IF B<1 OR B>INT(B)THEN 410
430 CLS:GOSUB 340:PRINT W$(W);HT$;H$:PRINT
440 FOR A=1 TO B:PRINT "+";STR$(A);"x";D;"d : ";
450 H=H+D:GOSUB 340:PRINT W1$(W);", ";
460 GOSUB 30:GOSUB 90:PRINT:PRINT:NEXT:GOSUB 300:GOTO 210
470 DATA Sonntag,Montag,Dienstag,Mittwoch,Donnerstag
480 DATA Freitag,Samstag
490 INPUT "Monat :";M:IF M<1 OR M>12 OR M>INT(M)THEN 490
500 INPUT "Jahr :";J1$:M$=STR$(M):RETURN
510 CLS:H$="1."+M$+"."+J1$:GOSUB 110:J$=H$:GOSUB 30:J=H1
520 PRINT " ";MID$(J$,3);:GOSUB 910:PRINT:PRINT:PRINT
525 FOR A=1 TO 6:PRINT W1$(A):PRINT:NEXT
530 PRINT W1$(0):PRINT:AS=9:FOR A=1 TO 40:GOSUB 340:W=W-1:IF W<0 THEN W=6
535 IF W=0 AND A>1 THEN AS=AS+3
540 PRINT AT(9+2*W,AS-LEN(STR$(A)));A:H=H+1
550 H2=M:IF A>27 THEN GOSUB 30
560 IF H2<>M THEN A=50
570 NEXT:RETURN
580 GOSUB 490
590 GOSUB 510:PRINT:PRINT AT(24,3);"<-- , --> oder >ENTER<"
600 GOSUB 300:IF A$=CHR$(13)THEN 210
610 IF A$=CHR$(8)THEN 650
620 IF A$<>CHR$(9)THEN 600
630 M=M+1:IF M>12 THEN M=1:J=J+1
640 GOTO 660
650 M=M-1:IF M<1 THEN M=12:J=J-1
660 M$=MID$(STR$(M),2):J1$=MID$(STR$(J),2):GOTO 590
700 R=H3:SR=0:IF R<0 THEN SR=1:R=-R
710 IF R>1000 THEN PRINT "M";:R=R-1000:GOTO 710
720 R1=INT(R/100):PRINT C$(R1);
730 R2=INT((R-R1*100)/10):PRINT X$(R2);
740 PRINT I$(R-R1*100-R2*10);:IF SR=1 THEN PRINT " v.u.Z.";
750 RETURN
900 IF JK=1 THEN H3=H3+1
902 PRINT:PRINT "(";H3;"= ";:GOSUB 700:PRINT " )":RETURN
910 RM=H3:H3=H1:GOSUB 920:H3=RM:RETURN
920 PRINT " (";:GOSUB 700:PRINT ")":RETURN
1000 DATA "I","II","III","IV","V","VI","VII","VIII","IX"
1010 DATA "X","XX","XXX","XL","L","LX","LXX","LXXX","XC"
1020 DATA "C","CC","CCC","CD","D","DC","DCC","DCCC","CM"