LOGICAL - Checking for leap year....
409788Feb 2 2004 — edited Feb 3 2004Is the following code enough to check whether an year is a Leap year.....
Declare
v_year Number(4) := &p_year;
BEGIN
IF MOD(v_year, 4 ) = 0
Then
DBMS_OUTPUT.PUT_LINE(v_year|| ' is a leap year');
ELSE
DBMS_OUTPUT.PUT_LINE(v_year|| ' is not a leap year');
END IF;
END;
/
That is... it only checks whether it is divisible by 4.