# Day of the week mod

Brd ->GBBS Sysop Board
Numb ->489 of 512
Sub ->Day of the week mod
To ->All
From ->Joe Prinz (#290)
Date ->05/24/87 13:38:15
The following is a mod I wrote to compute the day of the week using the TimeMaster II H.O… I cannot stress enough that this is ONLY for the TimeMaster II H.O… It has NOT been tested on ANY other card… Install this routine in your logon segment….

```; find the day of the week

; read the date\$ variable

d1 = val(left\$(date\$,2))
d2 = val(mid\$(date\$,4,2))
d3 = val(right\$(date\$,2))
if d1=1 d8\$="January"
if d1=2 d8\$="Febuary"
if d1=3 d8\$="March"
if d1=4 d8\$="April"
if d1=5 d8\$="May"
if d1=6 d8\$="June"
if d1=7 d8\$="July"
if d1=8 d8\$="August"
if d1=9 d8\$="September"
if d1=10 d8\$="October"
if d1=11 d8\$="November"
if d1=12 d8\$="December"

; Read TimeMaster II H.O

poke -16191,0:poke -16189,0:poke -16192,0:poke -16190,255
poke -16191,4:poke -16189,4
poke -16190,16
poke -16190,54:da = peek(-16192) - 240

; release the clock
poke -16190,47

; figure out which day it is

if da=0 wd\$="Sunday"
if da=1 wd\$="Monday"
if da=2 wd\$="Tuesday"
if da=3 wd\$="Wednesday"
if da=4 wd\$="Thursday"
if da=5 wd\$="Friday"
if da=6 wd\$="Saturday"
; here you may set the variable hl\$ to the name of a holiday
or a special
; day. This section is blank for your preference
;
; ex: if (d1=12) and (d2=25) hl\$="Christmas day"

set.info
dq\$="":dq\$=wd\$+" "+d8\$+" "+str\$(d2)+", "+"19"+str\$(d3)```

; obviously use “dq\$” as your string..
; it will look SOMETHING like this: Saturday May 23, 1987

Have fun with it!

Joe Prinz