Category : BASIC Source Code
Archive   : QBFAQR01.ZIP
Filename : DAYWEEK.BAS

 
Output of file : DAYWEEK.BAS contained in archive : QBFAQR01.ZIP
DECLARE FUNCTION Zeller% (Day%, Month%, Year%)
'
FUNCTION Zeller% (Day%, Month%, Year%) STATIC
' Zeller Algorithm : Returns Day of the Week

' Returns weekday
' 0 = sunday ... 6 = saturday
'
TmpDay% = Day%
TmpMonth% = Month%
TmpYear% = Year%
'
IF TmpMonth% > 2 THEN
TmpMonth% = TmpMonth% - 2
ELSE
TmpMonth% = TmpMonth% + 10
TmpYear% = TmpYear% - 1
END IF
Century% = TmpYear% \ 100
TmpYear% = TmpYear% MOD 100
Zeller% = (TmpDay% - 1 + ((13 * TmpMonth% - 1) \ 5) + (5 * TmpYear% \ 4) + Century% \ 4 - 2 * Century% + 1) MOD 7
'
END FUNCTION


  3 Responses to “Category : BASIC Source Code
Archive   : QBFAQR01.ZIP
Filename : DAYWEEK.BAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/