Day of the Week (Freeware)
by Daniel Bishop (danb2k@hotmail.com)
2000-10-10
How to use this program:
1. Type in the code. Run it.
2. Enter the year (4 digits, but 2 will work for 2000-2099).
3. Enter the month (1=January, 2=February...12=December).
4. Enter the day of the month.
Prgm_:DAYOFWK
:Disp "YEAR="
:Input Y
:Disp "MONTH="
:Input M
:Disp "DAY="
:Input D
:FPart (Y/4)=0 -> L
:If FPart (Y/100)=0
:0 -> L
:If FPart (Y/400)=0
:1 -> L
:If M=5
:1 -> W
:If (M=8)+(M=6
:10-M -> W
:If (M=2)+(M=3)+(M=11
:3 -> W
:If (M=9)+(M=12
:5 -> W
:If (M=4)+(M=7
:6 -> W
:If L(M>2
:W+1 -> W
:Y-1 -> P
:D+W+P+Int (P/4)-Int (P/100)+Int (P/400) -> W
:7FPart (W/7 -> W
:Round(W,0 -> W
:If W=0
:Disp "SUNDAY"
:If W=1
:Disp "MONDAY"
:If W=2
:Disp "TUESDAY"
:If W=3
:Disp "WEDNESDAY"
:If W=4
:Disp "THURSDAY"
:If W=5
:Disp "FRIDAY"
:If W=6
:Disp "SATURDAY"
Sample Run:
YEAR=
?2000
MONTH=
?10
DAY=
?10
TUESDAY
Done
YEAR=
?1983
MONTH=
?4
DAY=
?18
MONDAY
Done