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


Purpose   Validates a date string.

Decln.    Valid_date(Indate:string;format:byte):boolean;

Returns   Boolean

Remarks   Indate is the string to be validated.
          Format is the format code to indicate the format of the string.
          The valid date formats are declared as constants in the MiscTTT5
          unit:
               DDMMYY
               MMDDYY
               MMYY
               MMYYYY
               DDMMYYYY
               MMDDYYYY

          The procedure checks that the month is valid (i.e. in the range
          1..12) and that the day is within the valid range for the month.
          Leap years are accounted for.

Example

VAR
  OK : BOOLEAN;
BEGIN
    OK := VALID_DATE('02/31/90',MMDDYY);
END;

The variable OK is assigned the value FALSE because there are not 31 days
in February 1990.

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