valid_calendar_date

EXPRESS specification:

FUNCTION valid_calendar_date
(* Modified for LPM/6 *)(date : calendar_date) : LOGICAL; CASE date.month_component OF 1 : RETURN({ 1 <= date.day_component <= 31 }); 2 : BEGIN IF (leap_year(date.year_component)) THEN RETURN({ 1 <= date.day_component <= 29 }); ELSE RETURN({ 1 <= date.day_component <= 28 }); END_IF; END; 3 : RETURN({ 1 <= date.day_component <= 31 }); 4 : RETURN({ 1 <= date.day_component <= 30 }); 5 : RETURN({ 1 <= date.day_component <= 31 }); 6 : RETURN({ 1 <= date.day_component <= 30 }); 7 : RETURN({ 1 <= date.day_component <= 31 }); 8 : RETURN({ 1 <= date.day_component <= 31 }); 9 : RETURN({ 1 <= date.day_component <= 30 }); 10 : RETURN({ 1 <= date.day_component <= 31 }); 11 : RETURN({ 1 <= date.day_component <= 30 }); 12 : RETURN({ 1 <= date.day_component <= 31 }); END_CASE; RETURN (FALSE);
END_FUNCTION;