2 posts / 0 new
Last post
Help figuring out day of week for BBS software

This day of week code was written following the Gaussian method but it seems to be off each month. I believe it wasn't factoring in Y2K. Any help would be appreciated.

Assume p$ = "03/07/2019" the expected result should be "Thu", which it is. However it does not work with other dates (such as 04/01/2019 or 02/28/2019).

 

Any help would be greatly appreciated.

 

80 x=val(p$):i$=mid$(" JanFebMarAprMayJunJulAugSepOctNovDec",x*3+1,3):i=val(mid$(p$,7,2)):x=x-2:ifx<1thenx=x+12:i=i-1

81 i=i+int(i/4)+1+val(mid$(p$,4))+int(2.6*x-.1999):i=i-int(i/7)*7:p$=mid$("SunMonTueWedThuFriSat",i*3+1,3)+" "+mid$(p$,4,2)+"-"+i$+"-"+mid$(p$,7):return

 

FYI - this is for Supra 128 BBS, which I have managed to get working on Telnet at tfcbbs.com port 6400. Please give it a call!

I figured it out. Line 81

I figured it out. Line 81 should begin:
 
i=i+int(i/4)-35...
Instead of 
i=i+int(i/4)+1....
 

Log in or register to post comments