ISLEAP()

 

Syntax:

       Then: xx=ISLEAP(date)

       Then: xx=ISLEAP(year)

 

 "date" is a date within the year to test.

 "year" is a numeric field containing the year itself.

 

Return value is 1 if it is a leap year, 0 otherwise.

 

Version Ref:  4.5

 

Description:

Determines if a given year is a leap year.

 

Examples:

Using a date field, determine if the date is in a leap year.

 

      Then: input popup dt(10,mdyy/) "Enter a date: "
           If: isleap(dt) gt "0"
      Then: msgbox dt < "is during a leap year."

 

Using a number, determine if that year is a leap year.

 

      Then: input popup yr(4,.0) "Enter a year: "
           If: isleap(yr) gt "0"
      Then: msgbox yr < "is a leap year."

 

Note: A leap year is defined as any year divisible by 4, unless it ends in a "00", in which case it must also be divisible by 400. The year 2000 is a leap year.