home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
trl14db.zip
/
TRLPRG.EXE
/
EOW.PRG
< prev
next >
Wrap
Text File
|
1990-10-22
|
771b
|
26 lines
***********
* EOW.PRG
* by Tom Rettig and Leonard Zerman
* Placed in the Public Domain by Tom Rettig Associates, 10/22/1990.
*
* SYNTAX: DO EOW WITH <expD>
* RETURN: <expD> Sunday of the week in which the parameter date falls
* NOTE : To make this function return Friday instead of Sunday,
* replace the conditions specified below.
*********
PARAMETERS tr_date
DO CASE
CASE DOW(tr_date) = 1 && replace 1 with 5 to return Friday
tr_retd = tr_date
CASE DOW(tr_date) = 2 && replace 2 with 7 to return Friday
tr_retd = tr_date + 6
OTHERWISE && replace 8 with 2 to return Friday
tr_retd = tr_date + ( 8 - DOW(tr_date) )
ENDCASE
IF fox
RETURN (tr_retd)
ENDIF
* eofunc eow *