* contrib/gtwvg/gtwvg.hbp
* sorted
* contrib/gtwvg/wvgmle.prg
* contrib/gtwvg/wvgtreev.prg
* contrib/gtwvg/wvgcrt.prg
* contrib/gtwvg/wvgdatar.prg
* contrib/gtwvg/wvgsysw.prg
* contrib/gtwvg/wvgmenub.prg
* contrib/gtwvg/wvgphdlr.prg
* contrib/gtwvg/wvgstatc.prg
* contrib/hbnf/acctadj.prg
* contrib/hbnf/month.prg
* contrib/hbnf/ftint86.ch
* contrib/hbide/idethemes.prg
* contrib/hbide/idetags.prg
! IF() -> IIF()
56 lines
1.2 KiB
Plaintext
56 lines
1.2 KiB
Plaintext
/*
|
|
* $Id$
|
|
*/
|
|
|
|
/*
|
|
* File......: acctadj.prg
|
|
* Author....: Jo W. French dba Practical Computing
|
|
* CIS ID....: 74731,1751
|
|
*
|
|
* The functions contained herein are the original work of Jo W. French
|
|
* and are placed in the public domain.
|
|
*
|
|
* Modification history:
|
|
* ---------------------
|
|
*
|
|
* Rev 1.4 28 Sep 1992 00:22:38 GLENN
|
|
* Jo French clean up.
|
|
*
|
|
* Rev 1.3 15 Aug 1991 23:04:58 GLENN
|
|
* Forest Belt proofread/edited/cleaned up doc
|
|
*
|
|
* Rev 1.2 14 Jun 1991 19:50:40 GLENN
|
|
* Minor edit to file header
|
|
*
|
|
* Rev 1.1 11 May 1991 00:34:00 GLENN
|
|
* Documentation rewrite. Enter DOC header was rewritten and resubmitted
|
|
* by the author. No code changes.
|
|
*
|
|
* Rev 1.0 01 Apr 1991 01:00:22 GLENN
|
|
* Nanforum Toolkit
|
|
*
|
|
*/
|
|
|
|
FUNCTION FT_ACCTADJ(dGivenDate, lIsEnd)
|
|
|
|
LOCAL nTemp
|
|
|
|
IF !( VALTYPE(dGivenDate) == "D" )
|
|
dGivenDate := DATE()
|
|
ENDIF
|
|
|
|
lIsEnd := VALTYPE(lIsEnd) == "L"
|
|
nTemp := FT_DAYTOBOW(dGivenDate)
|
|
|
|
IF nTemp > ( 2 + iif(!lIsEnd, 1, 0) )
|
|
dGivenDate += ( 7 - nTemp ) // Next Week Start (This Week End + 1)
|
|
ELSE
|
|
dGivenDate -= nTemp // This Week Start (Prior Week End + 1)
|
|
ENDIF
|
|
|
|
IF lIsEnd
|
|
dGivenDate--
|
|
ENDIF
|
|
|
|
RETURN dGivenDate
|