home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / trl14db.zip / TRLPRG.EXE / INWEEKS.PRG < prev    next >
Text File  |  1990-10-22  |  556b  |  24 lines

  1. ***********
  2. * INWEEKS.PRG
  3. * by Tom Rettig and Leonard Zerman
  4. * Placed in the Public Domain by Tom Rettig Associates, 10/22/1990.
  5. *
  6. * SYNTAX: DO INWEEKS WITH <start date>, <end date> 
  7. * RETURN: <expN> number of weeks between two dates
  8. * NOTE  : Result is affected by the current state of SET DECIMALS
  9. ***********
  10. PARAMETERS tr_start, tr_end
  11. IF tr_start > tr_end
  12.    * Error -- start date is greater than end date
  13.    tr_retn = -1
  14. ELSE
  15.    tr_retn = ( tr_end - tr_start + 1 ) / 7
  16. ENDIF
  17. IF fox
  18.    RETURN (tr_retn)
  19. ENDIF
  20. * eof inweeks *
  21.  
  22.  
  23.  
  24.