Task

Determine whether a given year is a leap year in the Gregorian calendar.



See also

 Leap year (wiki)


FUNCTION isLeapYear RETURNS LOGICAL (
   i_iyear AS INTEGER
):
 
   DATE( 2, 29, i_iyear ) NO-ERROR.
   RETURN NOT ERROR-STATUS:ERROR.
 
END FUNCTION. /* isLeapYear */
 
MESSAGE
   1900 isLeapYear( 1900 ) SKIP
   1994 isLeapYear( 1994 ) SKIP
   1996 isLeapYear( 1996 ) SKIP
   1997 isLeapYear( 1997 ) SKIP
   2000 isLeapYear( 2000 )
VIEW-AS ALERT-BOX.