isValid

isValid(): Boolean;

The isValid method of the Date primitive type returns true if the receiver is a valid date. This method returns false if the date is invalid or is null (0).

This method also returns false for dates outside the valid internal representation range of 24th November -4713 through 31st December 1465072 Gregorian.

The code fragment in the following example shows the use of the isValid method.

if (day.String & "/" & month.String & "/" & year.String).Date.isValid then
    calendar.date.setDate(day, month, year);
else
    calendar.date.setDate(1, month, year);
endif;