home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crawly Crypt Collection 1
/
crawlyvol1.bin
/
utility
/
disk
/
egale_16
/
doku
/
beispie2.txt
< prev
next >
Wrap
Text File
|
1994-01-05
|
609b
|
36 lines
FUNCTION wochentag$(d$) ! Neu
DEFWRD "a-z"
'
LOCAL tag$,jahr,mon,tag,mo,jh,je,t
'
jahr=VAL(MID$(d$,7))
mon=VAL(MID$(d$,4,2))
tag=VAL(MID$(d$,1,2))
'
mo=mon-2
jh=jahr DIV 100
je=jahr MOD 100
IF mo<=0
ADD mo,12
DEC je
ENDIF
IF je<0
je=99
DEC jh
ENDIF
t=tag+INT(MUL(2.6,mo)-0.2)+je\4+je+(jh\4-MUL(2,jh))
WHILE t<0
ADD t,7
WEND
t=t MOD 7
RESTORE wochentage
tag$="Sonntag"
FOR i%=1 TO t
READ tag$
NEXT i%
RETURN tag$
wochentage:
DATA Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag,Sonntag
ENDFUNC