[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Date_Within_Range


Purpose   Returns true if one date falls between two other dates.

Decln.    Date_Within_Range(Min,Max,Test:dates):Boolean;

Returns   Boolean

Remarks   Min, Max are the beginning and ending dates in Julian form.
          Test is the date being evaluated.

Example

VAR
  THESTART,
  THEEND,
  TESTDATE: DATES
BEGIN
    THESTART := DATE_TO_JULIAN('07/01/89',MMDDYY);
    THEEND   := DATE_TO_JULIAN('10/01/89',MMDDYY);
    TESTDATE := TODAY_IN_JULIAN;
    IF DATE_WITHIN_RANGE(THESTART,THEEND,TESTDATE) THEN
       FWRITELN('IT''S YOUR TURN TO CLEAN THE TOILET!');
END;

See Also: Valid_Date
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson